diff options
Diffstat (limited to 'src/google/protobuf/compiler/java/java_field.h')
-rw-r--r-- | src/google/protobuf/compiler/java/java_field.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/google/protobuf/compiler/java/java_field.h b/src/google/protobuf/compiler/java/java_field.h index 4dd4f57f..7275c099 100644 --- a/src/google/protobuf/compiler/java/java_field.h +++ b/src/google/protobuf/compiler/java/java_field.h @@ -37,9 +37,6 @@ #include <map> #include <memory> -#ifndef _SHARED_PTR_H -#include <google/protobuf/stubs/shared_ptr.h> -#endif #include <string> #include <google/protobuf/stubs/common.h> @@ -119,6 +116,7 @@ class ImmutableFieldLiteGenerator { virtual void GenerateEqualsCode(io::Printer* printer) const = 0; virtual void GenerateHashCode(io::Printer* printer) const = 0; + virtual string GetBoxedType() const = 0; private: @@ -140,7 +138,7 @@ class FieldGeneratorMap { const Descriptor* descriptor_; Context* context_; ClassNameResolver* name_resolver_; - google::protobuf::scoped_array<google::protobuf::scoped_ptr<FieldGeneratorType> > field_generators_; + std::vector<std::unique_ptr<FieldGeneratorType>> field_generators_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(FieldGeneratorMap); }; @@ -162,6 +160,14 @@ template<> FieldGeneratorMap<ImmutableFieldGenerator>::~FieldGeneratorMap(); +template <> +FieldGeneratorMap<ImmutableFieldLiteGenerator>::FieldGeneratorMap( + const Descriptor* descriptor, Context* context); + +template <> +FieldGeneratorMap<ImmutableFieldLiteGenerator>::~FieldGeneratorMap(); + + // Field information used in FieldGeneartors. struct FieldGeneratorInfo { string name; @@ -169,7 +175,7 @@ struct FieldGeneratorInfo { string disambiguated_reason; }; -// Oneof information used in OneofFieldGeneartors. +// Oneof information used in OneofFieldGenerators. struct OneofGeneratorInfo { string name; string capitalized_name; @@ -178,15 +184,15 @@ struct OneofGeneratorInfo { // Set some common variables used in variable FieldGenerators. void SetCommonFieldVariables(const FieldDescriptor* descriptor, const FieldGeneratorInfo* info, - map<string, string>* variables); + std::map<string, string>* variables); // Set some common oneof variables used in OneofFieldGenerators. void SetCommonOneofVariables(const FieldDescriptor* descriptor, const OneofGeneratorInfo* info, - map<string, string>* variables); + std::map<string, string>* variables); // Print useful comments before a field's accessors. -void PrintExtraFieldInfo(const map<string, string>& variables, +void PrintExtraFieldInfo(const std::map<string, string>& variables, io::Printer* printer); } // namespace java |