diff options
Diffstat (limited to 'src/google/protobuf/compiler/java/java_shared_code_generator.h')
-rw-r--r-- | src/google/protobuf/compiler/java/java_shared_code_generator.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/google/protobuf/compiler/java/java_shared_code_generator.h b/src/google/protobuf/compiler/java/java_shared_code_generator.h index 38a32fc2..58a31f5d 100644 --- a/src/google/protobuf/compiler/java/java_shared_code_generator.h +++ b/src/google/protobuf/compiler/java/java_shared_code_generator.h @@ -36,13 +36,11 @@ #define GOOGLE_PROTOBUF_COMPILER_JAVA_SHARED_CODE_GENERATOR_H__ #include <memory> -#ifndef _SHARED_PTR_H -#include <google/protobuf/stubs/shared_ptr.h> -#endif #include <string> #include <vector> #include <google/protobuf/stubs/common.h> +#include <google/protobuf/compiler/java/java_options.h> namespace google { namespace protobuf { @@ -66,22 +64,19 @@ namespace java { // and mutable API. Currently only descriptors are shared. class SharedCodeGenerator { public: - explicit SharedCodeGenerator(const FileDescriptor* file); + SharedCodeGenerator(const FileDescriptor* file, const Options& options); ~SharedCodeGenerator(); void Generate(GeneratorContext* generator_context, - vector<string>* file_list); + std::vector<string>* file_list, + std::vector<string>* annotation_file_list); void GenerateDescriptors(io::Printer* printer); private: - // Returns whether the dependency should be included in the output file. - // Always returns true for opensource, but used internally at Google to help - // improve compatibility with version 1 of protocol buffers. - bool ShouldIncludeDependency(const FileDescriptor* descriptor); - - google::protobuf::scoped_ptr<ClassNameResolver> name_resolver_; + std::unique_ptr<ClassNameResolver> name_resolver_; const FileDescriptor* file_; + const Options options_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(SharedCodeGenerator); }; |