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