| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 // implements FieldGenerator --------------------------------------- | 52 // implements FieldGenerator --------------------------------------- |
| 53 void GeneratePrivateMembers(io::Printer* printer) const; | 53 void GeneratePrivateMembers(io::Printer* printer) const; |
| 54 void GenerateAccessorDeclarations(io::Printer* printer) const; | 54 void GenerateAccessorDeclarations(io::Printer* printer) const; |
| 55 void GenerateInlineAccessorDefinitions(io::Printer* printer, | 55 void GenerateInlineAccessorDefinitions(io::Printer* printer, |
| 56 bool is_inline) const; | 56 bool is_inline) const; |
| 57 void GenerateClearingCode(io::Printer* printer) const; | 57 void GenerateClearingCode(io::Printer* printer) const; |
| 58 void GenerateMergingCode(io::Printer* printer) const; | 58 void GenerateMergingCode(io::Printer* printer) const; |
| 59 void GenerateSwappingCode(io::Printer* printer) const; | 59 void GenerateSwappingCode(io::Printer* printer) const; |
| 60 void GenerateConstructorCode(io::Printer* printer) const; | 60 void GenerateConstructorCode(io::Printer* printer) const; |
| 61 void GenerateCopyConstructorCode(io::Printer* printer) const; |
| 61 void GenerateMergeFromCodedStream(io::Printer* printer) const; | 62 void GenerateMergeFromCodedStream(io::Printer* printer) const; |
| 62 void GenerateSerializeWithCachedSizes(io::Printer* printer) const; | 63 void GenerateSerializeWithCachedSizes(io::Printer* printer) const; |
| 63 void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; | 64 void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; |
| 64 void GenerateByteSize(io::Printer* printer) const; | 65 void GenerateByteSize(io::Printer* printer) const; |
| 65 | 66 |
| 66 protected: | 67 protected: |
| 67 const FieldDescriptor* descriptor_; | 68 const FieldDescriptor* descriptor_; |
| 68 map<string, string> variables_; | 69 std::map<string, string> variables_; |
| 69 | 70 |
| 70 private: | 71 private: |
| 71 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); | 72 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(EnumFieldGenerator); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 class EnumOneofFieldGenerator : public EnumFieldGenerator { | 75 class EnumOneofFieldGenerator : public EnumFieldGenerator { |
| 75 public: | 76 public: |
| 76 EnumOneofFieldGenerator(const FieldDescriptor* descriptor, | 77 EnumOneofFieldGenerator(const FieldDescriptor* descriptor, |
| 77 const Options& options); | 78 const Options& options); |
| 78 ~EnumOneofFieldGenerator(); | 79 ~EnumOneofFieldGenerator(); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 96 | 97 |
| 97 // implements FieldGenerator --------------------------------------- | 98 // implements FieldGenerator --------------------------------------- |
| 98 void GeneratePrivateMembers(io::Printer* printer) const; | 99 void GeneratePrivateMembers(io::Printer* printer) const; |
| 99 void GenerateAccessorDeclarations(io::Printer* printer) const; | 100 void GenerateAccessorDeclarations(io::Printer* printer) const; |
| 100 void GenerateInlineAccessorDefinitions(io::Printer* printer, | 101 void GenerateInlineAccessorDefinitions(io::Printer* printer, |
| 101 bool is_inline) const; | 102 bool is_inline) const; |
| 102 void GenerateClearingCode(io::Printer* printer) const; | 103 void GenerateClearingCode(io::Printer* printer) const; |
| 103 void GenerateMergingCode(io::Printer* printer) const; | 104 void GenerateMergingCode(io::Printer* printer) const; |
| 104 void GenerateSwappingCode(io::Printer* printer) const; | 105 void GenerateSwappingCode(io::Printer* printer) const; |
| 105 void GenerateConstructorCode(io::Printer* printer) const; | 106 void GenerateConstructorCode(io::Printer* printer) const; |
| 107 void GenerateCopyConstructorCode(io::Printer* printer) const {} |
| 106 void GenerateMergeFromCodedStream(io::Printer* printer) const; | 108 void GenerateMergeFromCodedStream(io::Printer* printer) const; |
| 107 void GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const; | 109 void GenerateMergeFromCodedStreamWithPacking(io::Printer* printer) const; |
| 108 void GenerateSerializeWithCachedSizes(io::Printer* printer) const; | 110 void GenerateSerializeWithCachedSizes(io::Printer* printer) const; |
| 109 void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; | 111 void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; |
| 110 void GenerateByteSize(io::Printer* printer) const; | 112 void GenerateByteSize(io::Printer* printer) const; |
| 111 | 113 |
| 112 private: | 114 private: |
| 113 const FieldDescriptor* descriptor_; | 115 const FieldDescriptor* descriptor_; |
| 114 map<string, string> variables_; | 116 std::map<string, string> variables_; |
| 115 | 117 |
| 116 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator); | 118 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedEnumFieldGenerator); |
| 117 }; | 119 }; |
| 118 | 120 |
| 119 } // namespace cpp | 121 } // namespace cpp |
| 120 } // namespace compiler | 122 } // namespace compiler |
| 121 } // namespace protobuf | 123 } // namespace protobuf |
| 122 | 124 |
| 123 } // namespace google | 125 } // namespace google |
| 124 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_FIELD_H__ | 126 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_ENUM_FIELD_H__ |
| OLD | NEW |