| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 const Options& options); | 59 const Options& options); |
| 60 ~MessageGenerator(); | 60 ~MessageGenerator(); |
| 61 | 61 |
| 62 void GenerateStaticVariablesInitialization(io::Printer* printer); | 62 void GenerateStaticVariablesInitialization(io::Printer* printer); |
| 63 void GenerateEnumHeader(io::Printer* printer); | 63 void GenerateEnumHeader(io::Printer* printer); |
| 64 void GenerateMessageHeader(io::Printer* printer); | 64 void GenerateMessageHeader(io::Printer* printer); |
| 65 void GenerateSource(io::Printer* printer); | 65 void GenerateSource(io::Printer* printer); |
| 66 void GenerateExtensionRegistrationSource(io::Printer* printer); | 66 void GenerateExtensionRegistrationSource(io::Printer* printer); |
| 67 void DetermineForwardDeclarations(set<string>* fwd_decls); | 67 void DetermineForwardDeclarations(set<string>* fwd_decls); |
| 68 | 68 |
| 69 // Checks if the message or a nested message includes a oneof definition. |
| 70 bool IncludesOneOfDefinition() const; |
| 71 |
| 69 private: | 72 private: |
| 70 void GenerateParseFromMethodsHeader(io::Printer* printer); | 73 void GenerateParseFromMethodsHeader(io::Printer* printer); |
| 71 | 74 |
| 72 void GenerateSerializeOneFieldSource(io::Printer* printer, | 75 void GenerateSerializeOneFieldSource(io::Printer* printer, |
| 73 const FieldDescriptor* field); | 76 const FieldDescriptor* field); |
| 74 void GenerateSerializeOneExtensionRangeSource( | 77 void GenerateSerializeOneExtensionRangeSource( |
| 75 io::Printer* printer, const Descriptor::ExtensionRange* range); | 78 io::Printer* printer, const Descriptor::ExtensionRange* range); |
| 76 | 79 |
| 77 void GenerateMessageDescriptionSource(io::Printer* printer); | 80 void GenerateMessageDescriptionSource(io::Printer* printer); |
| 78 void GenerateDescriptionOneFieldSource(io::Printer* printer, | 81 void GenerateDescriptionOneFieldSource(io::Printer* printer, |
| 79 const FieldDescriptor* field); | 82 const FieldDescriptor* field); |
| 80 | 83 |
| 81 const string root_classname_; | 84 const string root_classname_; |
| 82 const Descriptor* descriptor_; | 85 const Descriptor* descriptor_; |
| 83 FieldGeneratorMap field_generators_; | 86 FieldGeneratorMap field_generators_; |
| 84 const string class_name_; | 87 const string class_name_; |
| 88 const string deprecated_attribute_; |
| 85 vector<ExtensionGenerator*> extension_generators_; | 89 vector<ExtensionGenerator*> extension_generators_; |
| 86 vector<EnumGenerator*> enum_generators_; | 90 vector<EnumGenerator*> enum_generators_; |
| 87 vector<MessageGenerator*> nested_message_generators_; | 91 vector<MessageGenerator*> nested_message_generators_; |
| 88 vector<OneofGenerator*> oneof_generators_; | 92 vector<OneofGenerator*> oneof_generators_; |
| 89 | 93 |
| 90 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); | 94 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator); |
| 91 }; | 95 }; |
| 92 } // namespace objectivec | 96 } // namespace objectivec |
| 93 } // namespace compiler | 97 } // namespace compiler |
| 94 } // namespace protobuf | 98 } // namespace protobuf |
| 95 } // namespace google | 99 } // namespace google |
| 96 #endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_MESSAGE_H__ | 100 #endif // GOOGLE_PROTOBUF_COMPILER_OBJECTIVEC_MESSAGE_H__ |
| OLD | NEW |