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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // implements FieldGenerator --------------------------------------- | 49 // implements FieldGenerator --------------------------------------- |
50 void GeneratePrivateMembers(io::Printer* printer) const; | 50 void GeneratePrivateMembers(io::Printer* printer) const; |
51 void GenerateAccessorDeclarations(io::Printer* printer) const; | 51 void GenerateAccessorDeclarations(io::Printer* printer) const; |
52 void GenerateInlineAccessorDefinitions(io::Printer* printer, | 52 void GenerateInlineAccessorDefinitions(io::Printer* printer, |
53 bool is_inline) const; | 53 bool is_inline) const; |
54 void GenerateClearingCode(io::Printer* printer) const; | 54 void GenerateClearingCode(io::Printer* printer) const; |
55 void GenerateMergingCode(io::Printer* printer) const; | 55 void GenerateMergingCode(io::Printer* printer) const; |
56 void GenerateSwappingCode(io::Printer* printer) const; | 56 void GenerateSwappingCode(io::Printer* printer) const; |
57 void GenerateConstructorCode(io::Printer* printer) const; | 57 void GenerateConstructorCode(io::Printer* printer) const; |
| 58 void GenerateCopyConstructorCode(io::Printer* printer) const; |
58 void GenerateMergeFromCodedStream(io::Printer* printer) const; | 59 void GenerateMergeFromCodedStream(io::Printer* printer) const; |
59 void GenerateSerializeWithCachedSizes(io::Printer* printer) const; | 60 void GenerateSerializeWithCachedSizes(io::Printer* printer) const; |
60 void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; | 61 void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; |
61 void GenerateByteSize(io::Printer* printer) const; | 62 void GenerateByteSize(io::Printer* printer) const; |
62 | 63 |
63 private: | 64 private: |
| 65 // A helper for GenerateSerializeWithCachedSizes{,ToArray}. |
| 66 void GenerateSerializeWithCachedSizes( |
| 67 io::Printer* printer, const std::map<string, string>& variables) const; |
| 68 |
64 const FieldDescriptor* descriptor_; | 69 const FieldDescriptor* descriptor_; |
65 const bool dependent_field_; | 70 const bool dependent_field_; |
66 map<string, string> variables_; | 71 std::map<string, string> variables_; |
67 | 72 |
68 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator); | 73 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator); |
69 }; | 74 }; |
70 | 75 |
71 } // namespace cpp | 76 } // namespace cpp |
72 } // namespace compiler | 77 } // namespace compiler |
73 } // namespace protobuf | 78 } // namespace protobuf |
74 | 79 |
75 } // namespace google | 80 } // namespace google |
76 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_MAP_FIELD_H__ | 81 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_MAP_FIELD_H__ |
OLD | NEW |