diff options
author | Thomas Van Lenten <thomasvl@google.com> | 2016-08-23 11:14:18 -0400 |
---|---|---|
committer | Thomas Van Lenten <thomasvl@google.com> | 2016-08-23 11:19:38 -0400 |
commit | 290d26b46266bb8e0ddcc542cf465719135b401a (patch) | |
tree | 263afd80cda7753ddc9bb6fdffe885531c69169d /src/google/protobuf/compiler/objectivec/objectivec_helpers.h | |
parent | 93362a5aa552a7797a54efd05ccc678348ff9ef7 (diff) | |
download | protobuf-290d26b46266bb8e0ddcc542cf465719135b401a.tar.gz protobuf-290d26b46266bb8e0ddcc542cf465719135b401a.tar.bz2 protobuf-290d26b46266bb8e0ddcc542cf465719135b401a.zip |
Remove the compiler options from ImportWriter.
Breaks the tie of the ImportWriter to the ObjC generation, allow grpc to use
a different extension and to relay the values they need for these.
- Pass in the two framework options to the ctor.
- Pass in the header extension to AddFile.
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_helpers.h')
-rw-r--r-- | src/google/protobuf/compiler/objectivec/objectivec_helpers.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h index db303154..344723a6 100644 --- a/src/google/protobuf/compiler/objectivec/objectivec_helpers.h +++ b/src/google/protobuf/compiler/objectivec/objectivec_helpers.h @@ -230,11 +230,11 @@ bool ParseSimpleFile( // import statements. class LIBPROTOC_EXPORT ImportWriter { public: - ImportWriter(const Options& options) - : options_(options), - need_to_parse_mapping_file_(true) {} + ImportWriter(const string& generate_for_named_framework, + const string& named_framework_to_proto_path_mappings_path); + ~ImportWriter(); - void AddFile(const FileDescriptor* file); + void AddFile(const FileDescriptor* file, const string& header_extension); void Print(io::Printer *printer) const; private: @@ -251,7 +251,8 @@ class LIBPROTOC_EXPORT ImportWriter { void ParseFrameworkMappings(); - const Options options_; + const string generate_for_named_framework_; + const string named_framework_to_proto_path_mappings_path_; map<string, string> proto_file_to_framework_name_; bool need_to_parse_mapping_file_; |