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; | |
59 void GenerateMergeFromCodedStream(io::Printer* printer) const; | 58 void GenerateMergeFromCodedStream(io::Printer* printer) const; |
60 void GenerateSerializeWithCachedSizes(io::Printer* printer) const; | 59 void GenerateSerializeWithCachedSizes(io::Printer* printer) const; |
61 void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; | 60 void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const; |
62 void GenerateByteSize(io::Printer* printer) const; | 61 void GenerateByteSize(io::Printer* printer) const; |
63 | 62 |
64 private: | 63 private: |
65 // A helper for GenerateSerializeWithCachedSizes{,ToArray}. | |
66 void GenerateSerializeWithCachedSizes( | |
67 io::Printer* printer, const std::map<string, string>& variables) const; | |
68 | |
69 const FieldDescriptor* descriptor_; | 64 const FieldDescriptor* descriptor_; |
70 const bool dependent_field_; | 65 const bool dependent_field_; |
71 std::map<string, string> variables_; | 66 map<string, string> variables_; |
72 | 67 |
73 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator); | 68 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MapFieldGenerator); |
74 }; | 69 }; |
75 | 70 |
76 } // namespace cpp | 71 } // namespace cpp |
77 } // namespace compiler | 72 } // namespace compiler |
78 } // namespace protobuf | 73 } // namespace protobuf |
79 | 74 |
80 } // namespace google | 75 } // namespace google |
81 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_MAP_FIELD_H__ | 76 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_MAP_FIELD_H__ |
OLD | NEW |