aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
diff options
context:
space:
mode:
authorThomas Van Lenten <thomasvl@google.com>2015-11-30 14:38:04 -0500
committerThomas Van Lenten <thomasvl@google.com>2016-02-18 13:55:59 -0500
commit2480acb6d974a2cfc1da5b1ea8cc14f2415e6dfe (patch)
tree3e95be3eae1e7d0ff8dce89951b167843127fb94 /src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
parent9ab11c6561abd5fe997a999f21799d160b0d14cf (diff)
downloadprotobuf-2480acb6d974a2cfc1da5b1ea8cc14f2415e6dfe.tar.gz
protobuf-2480acb6d974a2cfc1da5b1ea8cc14f2415e6dfe.tar.bz2
protobuf-2480acb6d974a2cfc1da5b1ea8cc14f2415e6dfe.zip
Support ObjC Generic Collections
- Extend GPB*ObjectDictionary to support generic syntax. - Update the generator to output generics so the enclosed type is exposed for compiler checks. - Use generics in a the public interfaces. - Update the generated sources that are checked in.
Diffstat (limited to 'src/google/protobuf/compiler/objectivec/objectivec_enum_field.h')
-rw-r--r--src/google/protobuf/compiler/objectivec/objectivec_enum_field.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h b/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
index b629eae8..ae2f57e3 100644
--- a/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
+++ b/src/google/protobuf/compiler/objectivec/objectivec_enum_field.h
@@ -41,7 +41,8 @@ namespace compiler {
namespace objectivec {
class EnumFieldGenerator : public SingleFieldGenerator {
- friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field);
+ friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field,
+ const Options& options);
public:
virtual void GenerateFieldDescriptionTypeSpecific(io::Printer* printer) const;
@@ -50,7 +51,7 @@ class EnumFieldGenerator : public SingleFieldGenerator {
virtual void DetermineForwardDeclarations(set<string>* fwd_decls) const;
protected:
- explicit EnumFieldGenerator(const FieldDescriptor* descriptor);
+ EnumFieldGenerator(const FieldDescriptor* descriptor, const Options& options);
virtual ~EnumFieldGenerator();
private:
@@ -58,13 +59,16 @@ class EnumFieldGenerator : public SingleFieldGenerator {
};
class RepeatedEnumFieldGenerator : public RepeatedFieldGenerator {
- friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field);
+ friend FieldGenerator* FieldGenerator::Make(const FieldDescriptor* field,
+ const Options& options);
public:
+ virtual void FinishInitialization();
virtual void GenerateFieldDescriptionTypeSpecific(io::Printer* printer) const;
protected:
- RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor);
+ RepeatedEnumFieldGenerator(const FieldDescriptor* descriptor,
+ const Options& options);
virtual ~RepeatedEnumFieldGenerator();
private: