| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2015 Google Inc. All rights reserved. | 2 // Copyright 2015 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 // Pull over some info from the value's flags. | 109 // Pull over some info from the value's flags. |
| 110 const string& value_field_flags = | 110 const string& value_field_flags = |
| 111 value_field_generator_->variable("fieldflags"); | 111 value_field_generator_->variable("fieldflags"); |
| 112 if (value_field_flags.find("GPBFieldHasDefaultValue") != string::npos) { | 112 if (value_field_flags.find("GPBFieldHasDefaultValue") != string::npos) { |
| 113 field_flags.push_back("GPBFieldHasDefaultValue"); | 113 field_flags.push_back("GPBFieldHasDefaultValue"); |
| 114 } | 114 } |
| 115 if (value_field_flags.find("GPBFieldHasEnumDescriptor") != string::npos) { | 115 if (value_field_flags.find("GPBFieldHasEnumDescriptor") != string::npos) { |
| 116 field_flags.push_back("GPBFieldHasEnumDescriptor"); | 116 field_flags.push_back("GPBFieldHasEnumDescriptor"); |
| 117 } | 117 } |
| 118 variables_["fieldflags"] = BuildFlagsString(FLAGTYPE_FIELD, field_flags); | 118 variables_["fieldflags"] = BuildFlagsString(field_flags); |
| 119 | 119 |
| 120 ObjectiveCType value_objc_type = GetObjectiveCType(value_descriptor); | 120 ObjectiveCType value_objc_type = GetObjectiveCType(value_descriptor); |
| 121 const bool value_is_object_type = | 121 const bool value_is_object_type = |
| 122 ((value_objc_type == OBJECTIVECTYPE_STRING) || | 122 ((value_objc_type == OBJECTIVECTYPE_STRING) || |
| 123 (value_objc_type == OBJECTIVECTYPE_DATA) || | 123 (value_objc_type == OBJECTIVECTYPE_DATA) || |
| 124 (value_objc_type == OBJECTIVECTYPE_MESSAGE)); | 124 (value_objc_type == OBJECTIVECTYPE_MESSAGE)); |
| 125 if ((GetObjectiveCType(key_descriptor) == OBJECTIVECTYPE_STRING) && | 125 if ((GetObjectiveCType(key_descriptor) == OBJECTIVECTYPE_STRING) && |
| 126 value_is_object_type) { | 126 value_is_object_type) { |
| 127 variables_["array_storage_type"] = "NSMutableDictionary"; | 127 variables_["array_storage_type"] = "NSMutableDictionary"; |
| 128 variables_["array_property_type"] = | 128 variables_["array_property_type"] = |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 value_field_generator_->variable("storage_type"); | 171 value_field_generator_->variable("storage_type"); |
| 172 fwd_decls->insert("@class " + value_storage_type); | 172 fwd_decls->insert("@class " + value_storage_type); |
| 173 } | 173 } |
| 174 } | 174 } |
| 175 | 175 |
| 176 | 176 |
| 177 } // namespace objectivec | 177 } // namespace objectivec |
| 178 } // namespace compiler | 178 } // namespace compiler |
| 179 } // namespace protobuf | 179 } // namespace protobuf |
| 180 } // namespace google | 180 } // namespace google |
| OLD | NEW |