diff options
Diffstat (limited to 'src/google/protobuf/compiler/java/java_file.h')
-rw-r--r-- | src/google/protobuf/compiler/java/java_file.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/google/protobuf/compiler/java/java_file.h b/src/google/protobuf/compiler/java/java_file.h index 080b3424..78833a45 100644 --- a/src/google/protobuf/compiler/java/java_file.h +++ b/src/google/protobuf/compiler/java/java_file.h @@ -36,12 +36,10 @@ #define GOOGLE_PROTOBUF_COMPILER_JAVA_FILE_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 { @@ -67,7 +65,8 @@ namespace java { class FileGenerator { public: - FileGenerator(const FileDescriptor* file, bool immutable_api = true); + FileGenerator(const FileDescriptor* file, const Options& options, + bool immutable_api = true); ~FileGenerator(); // Checks for problems that would otherwise lead to cryptic compile errors. @@ -82,12 +81,12 @@ class FileGenerator { // service type). void GenerateSiblings(const string& package_dir, GeneratorContext* generator_context, - vector<string>* file_list); + std::vector<string>* file_list, + std::vector<string>* annotation_list); const string& java_package() { return java_package_; } const string& classname() { return classname_; } - private: void GenerateDescriptorInitializationCodeForImmutable(io::Printer* printer); void GenerateDescriptorInitializationCodeForMutable(io::Printer* printer); @@ -99,14 +98,14 @@ class FileGenerator { string java_package_; string classname_; - google::protobuf::scoped_array<google::protobuf::scoped_ptr<MessageGenerator> > message_generators_; - google::protobuf::scoped_array<google::protobuf::scoped_ptr<ExtensionGenerator> > extension_generators_; - google::protobuf::scoped_ptr<GeneratorFactory> generator_factory_; - google::protobuf::scoped_ptr<Context> context_; + std::vector<std::unique_ptr<MessageGenerator>> message_generators_; + std::vector<std::unique_ptr<ExtensionGenerator>> extension_generators_; + std::unique_ptr<GeneratorFactory> generator_factory_; + std::unique_ptr<Context> context_; ClassNameResolver* name_resolver_; + const Options options_; bool immutable_api_; - GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FileGenerator); }; |