Index: third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc |
diff --git a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc |
index f2ce4e5b54d1347b48f9ad16153c2a7386045ca7..d6ccd6d1e7b62970ff53b444223e7c4d2cf7df24 100644 |
--- a/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc |
+++ b/third_party/protobuf/src/google/protobuf/compiler/objectivec/objectivec_message_field.cc |
@@ -58,8 +58,9 @@ void SetMessageVariables(const FieldDescriptor* descriptor, |
} // namespace |
-MessageFieldGenerator::MessageFieldGenerator(const FieldDescriptor* descriptor) |
- : ObjCObjFieldGenerator(descriptor) { |
+MessageFieldGenerator::MessageFieldGenerator(const FieldDescriptor* descriptor, |
+ const Options& options) |
+ : ObjCObjFieldGenerator(descriptor, options) { |
SetMessageVariables(descriptor, &variables_); |
} |
@@ -67,6 +68,7 @@ MessageFieldGenerator::~MessageFieldGenerator() {} |
void MessageFieldGenerator::DetermineForwardDeclarations( |
set<string>* fwd_decls) const { |
+ ObjCObjFieldGenerator::DetermineForwardDeclarations(fwd_decls); |
// Class name is already in "storage_type". |
fwd_decls->insert("@class " + variable("storage_type")); |
} |
@@ -82,14 +84,24 @@ bool MessageFieldGenerator::WantsHasProperty(void) const { |
} |
RepeatedMessageFieldGenerator::RepeatedMessageFieldGenerator( |
- const FieldDescriptor* descriptor) |
- : RepeatedFieldGenerator(descriptor) { |
+ const FieldDescriptor* descriptor, const Options& options) |
+ : RepeatedFieldGenerator(descriptor, options) { |
SetMessageVariables(descriptor, &variables_); |
variables_["array_storage_type"] = "NSMutableArray"; |
+ variables_["array_property_type"] = |
+ "NSMutableArray<" + variables_["storage_type"] + "*>"; |
} |
RepeatedMessageFieldGenerator::~RepeatedMessageFieldGenerator() {} |
+void RepeatedMessageFieldGenerator::DetermineForwardDeclarations( |
+ set<string>* fwd_decls) const { |
+ RepeatedFieldGenerator::DetermineForwardDeclarations(fwd_decls); |
+ // Class name is already in "storage_type". |
+ fwd_decls->insert("@class " + variable("storage_type")); |
+} |
+ |
+ |
} // namespace objectivec |
} // namespace compiler |
} // namespace protobuf |