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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void GenerateSerializationCode(io::Printer* printer) const; | 75 void GenerateSerializationCode(io::Printer* printer) const; |
76 void GenerateSerializedSizeCode(io::Printer* printer) const; | 76 void GenerateSerializedSizeCode(io::Printer* printer) const; |
77 void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; | 77 void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; |
78 void GenerateEqualsCode(io::Printer* printer) const; | 78 void GenerateEqualsCode(io::Printer* printer) const; |
79 void GenerateHashCode(io::Printer* printer) const; | 79 void GenerateHashCode(io::Printer* printer) const; |
80 | 80 |
81 string GetBoxedType() const; | 81 string GetBoxedType() const; |
82 | 82 |
83 protected: | 83 protected: |
84 const FieldDescriptor* descriptor_; | 84 const FieldDescriptor* descriptor_; |
85 std::map<string, string> variables_; | 85 map<string, string> variables_; |
86 const int messageBitIndex_; | 86 const int messageBitIndex_; |
87 const int builderBitIndex_; | 87 const int builderBitIndex_; |
88 Context* context_; | 88 Context* context_; |
89 ClassNameResolver* name_resolver_; | 89 ClassNameResolver* name_resolver_; |
90 | 90 |
91 void PrintNestedBuilderCondition(io::Printer* printer, | 91 void PrintNestedBuilderCondition(io::Printer* printer, |
92 const char* regular_case, const char* nested_builder_case) const; | 92 const char* regular_case, const char* nested_builder_case) const; |
93 void PrintNestedBuilderFunction(io::Printer* printer, | 93 void PrintNestedBuilderFunction(io::Printer* printer, |
94 const char* method_prototype, const char* regular_case, | 94 const char* method_prototype, const char* regular_case, |
95 const char* nested_builder_case, | 95 const char* nested_builder_case, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 void GenerateSerializationCode(io::Printer* printer) const; | 141 void GenerateSerializationCode(io::Printer* printer) const; |
142 void GenerateSerializedSizeCode(io::Printer* printer) const; | 142 void GenerateSerializedSizeCode(io::Printer* printer) const; |
143 void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; | 143 void GenerateFieldBuilderInitializationCode(io::Printer* printer) const; |
144 void GenerateEqualsCode(io::Printer* printer) const; | 144 void GenerateEqualsCode(io::Printer* printer) const; |
145 void GenerateHashCode(io::Printer* printer) const; | 145 void GenerateHashCode(io::Printer* printer) const; |
146 | 146 |
147 string GetBoxedType() const; | 147 string GetBoxedType() const; |
148 | 148 |
149 protected: | 149 protected: |
150 const FieldDescriptor* descriptor_; | 150 const FieldDescriptor* descriptor_; |
151 std::map<string, string> variables_; | 151 map<string, string> variables_; |
152 const int messageBitIndex_; | 152 const int messageBitIndex_; |
153 const int builderBitIndex_; | 153 const int builderBitIndex_; |
154 Context* context_; | 154 Context* context_; |
155 ClassNameResolver* name_resolver_; | 155 ClassNameResolver* name_resolver_; |
156 | 156 |
157 void PrintNestedBuilderCondition(io::Printer* printer, | 157 void PrintNestedBuilderCondition(io::Printer* printer, |
158 const char* regular_case, const char* nested_builder_case) const; | 158 const char* regular_case, const char* nested_builder_case) const; |
159 void PrintNestedBuilderFunction(io::Printer* printer, | 159 void PrintNestedBuilderFunction(io::Printer* printer, |
160 const char* method_prototype, const char* regular_case, | 160 const char* method_prototype, const char* regular_case, |
161 const char* nested_builder_case, | 161 const char* nested_builder_case, |
162 const char* trailing_code) const; | 162 const char* trailing_code) const; |
163 | 163 |
164 private: | 164 private: |
165 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedImmutableMessageFieldGenerator); | 165 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(RepeatedImmutableMessageFieldGenerator); |
166 }; | 166 }; |
167 | 167 |
168 } // namespace java | 168 } // namespace java |
169 } // namespace compiler | 169 } // namespace compiler |
170 } // namespace protobuf | 170 } // namespace protobuf |
171 | 171 |
172 } // namespace google | 172 } // namespace google |
173 #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_FIELD_H__ | 173 #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_MESSAGE_FIELD_H__ |
OLD | NEW |