protobuf/src/google/protobuf/compiler/cpp/cpp_message.h
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 // Author: kenton@google.com (Kenton Varda)
32 // Based on original Protocol Buffers design by
33 // Sanjay Ghemawat, Jeff Dean, and others.
34 
35 #ifndef GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_H__
36 #define GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_H__
37 
38 #include <cstdint>
39 #include <memory>
40 #include <set>
41 #include <string>
42 
43 #include <google/protobuf/compiler/cpp/cpp_field.h>
44 #include <google/protobuf/compiler/cpp/cpp_helpers.h>
45 #include <google/protobuf/compiler/cpp/cpp_message_layout_helper.h>
46 #include <google/protobuf/compiler/cpp/cpp_options.h>
48 
49 namespace google {
50 namespace protobuf {
51 namespace io {
52 class Printer; // printer.h
53 }
54 } // namespace protobuf
55 } // namespace google
56 
57 namespace google {
58 namespace protobuf {
59 namespace compiler {
60 namespace cpp {
61 
62 class EnumGenerator; // enum.h
63 class ExtensionGenerator; // extension.h
64 
65 class MessageGenerator {
66  public:
67  // See generator.cc for the meaning of dllexport_decl.
69  const std::map<std::string, std::string>& vars,
70  int index_in_file_messages, const Options& options,
71  MessageSCCAnalyzer* scc_analyzer);
73 
74  // Append the two types of nested generators to the corresponding vector.
75  void AddGenerators(
76  std::vector<std::unique_ptr<EnumGenerator>>* enum_generators,
77  std::vector<std::unique_ptr<ExtensionGenerator>>* extension_generators);
78 
79  // Generate definitions for this class and all its nested types.
80  void GenerateClassDefinition(io::Printer* printer);
81 
82  // Generate definitions of inline methods (placed at the end of the header
83  // file).
84  void GenerateInlineMethods(io::Printer* printer);
85 
86  // Source file stuff.
87 
88  // Generate all non-inline methods for this class.
89  void GenerateClassMethods(io::Printer* printer);
90 
91  // Generate source file code that should go outside any namespace.
93 
94  private:
95  // Generate declarations and definitions of accessors for fields.
98 
99  // Generate the table-driven parsing array. Returns the number of entries
100  // generated.
101  size_t GenerateParseOffsets(io::Printer* printer);
102  size_t GenerateParseAuxTable(io::Printer* printer);
103  // Generates a ParseTable entry. Returns whether the proto uses
104  // table-driven parsing.
105  bool GenerateParseTable(io::Printer* printer, size_t offset,
106  size_t aux_offset);
107 
108  // Generate the field offsets array. Returns the a pair of the total number
109  // of entries generated and the index of the first has_bit entry.
110  std::pair<size_t, size_t> GenerateOffsets(io::Printer* printer);
111  void GenerateSchema(io::Printer* printer, int offset, int has_offset);
112  // For each field generates a table entry describing the field for the
113  // table driven serializer.
114  int GenerateFieldMetadata(io::Printer* printer);
115 
116  // Generate constructors and destructor.
117  void GenerateStructors(io::Printer* printer);
118 
119  // The compiler typically generates multiple copies of each constructor and
120  // destructor: http://gcc.gnu.org/bugs.html#nonbugs_cxx
121  // Placing common code in a separate method reduces the generated code size.
122  //
123  // Generate the shared constructor code.
125  // Generate the shared destructor code.
127  // Generate the arena-specific destructor code.
129 
130  // Generate the constexpr constructor for constant initialization of the
131  // default instance.
133 
134  // Generate standard Message methods.
135  void GenerateClear(io::Printer* printer);
136  void GenerateOneofClear(io::Printer* printer);
137  void GenerateVerify(io::Printer* printer);
142  void GenerateByteSize(io::Printer* printer);
143  void GenerateMergeFrom(io::Printer* printer);
145  void GenerateCopyFrom(io::Printer* printer);
146  void GenerateSwap(io::Printer* printer);
147  void GenerateIsInitialized(io::Printer* printer);
148 
149  // Helpers for GenerateSerializeWithCachedSizes().
150  //
151  // cached_has_bit_index maintains that:
152  // cached_has_bits = _has_bits_[cached_has_bit_index]
153  // for cached_has_bit_index >= 0
155  const FieldDescriptor* field,
156  int cached_has_bits_index);
157  // Generate a switch statement to serialize 2+ fields from the same oneof.
158  // Or, if fields.size() == 1, just call GenerateSerializeOneField().
160  io::Printer* printer, const std::vector<const FieldDescriptor*>& fields);
162  io::Printer* printer, const Descriptor::ExtensionRange* range);
163 
164  // Generates has_foo() functions and variables for singular field has-bits.
166  Formatter format);
167  // Generates has_foo() functions and variables for oneof field has-bits.
168  void GenerateOneofHasBits(io::Printer* printer);
169  // Generates has_foo_bar() functions for oneof members.
171  const Formatter& format);
172  // Generates the clear_foo() method for a field.
173  void GenerateFieldClear(const FieldDescriptor* field, bool is_inline,
174  Formatter format);
175 
176  void GenerateConstructorBody(io::Printer* printer,
177  std::vector<bool> already_processed,
178  bool copy_constructor) const;
179 
180  size_t HasBitsSize() const;
181  size_t InlinedStringDonatedSize() const;
182  int HasBitIndex(const FieldDescriptor* a) const;
183  int HasByteIndex(const FieldDescriptor* a) const;
184  int HasWordIndex(const FieldDescriptor* a) const;
185  bool SameHasByte(const FieldDescriptor* a, const FieldDescriptor* b) const;
186  std::vector<uint32_t> RequiredFieldsBitMask() const;
187 
188  const Descriptor* descriptor_;
191  Options options_;
192  FieldGeneratorMap field_generators_;
193  // optimized_order_ is the order we layout the message's fields in the
194  // class. This is reused to initialize the fields in-order for cache
195  // efficiency.
196  //
197  // optimized_order_ excludes oneof fields and weak fields.
198  std::vector<const FieldDescriptor*> optimized_order_;
199  std::vector<int> has_bit_indices_;
200  int max_has_bit_index_;
201 
202  // A map from field index to inlined_string index. For non-inlined-string
203  // fields, the element is -1.
204  std::vector<int> inlined_string_indices_;
205  // The count of inlined_string fields in the message.
207 
208  std::vector<const EnumGenerator*> enum_generators_;
209  std::vector<const ExtensionGenerator*> extension_generators_;
211  int num_weak_fields_;
212  // table_driven_ indicates the generated message uses table-driven parsing.
213  bool table_driven_;
214 
215  std::unique_ptr<MessageLayoutHelper> message_layout_helper_;
216  std::unique_ptr<ParseFunctionGenerator> parse_function_generator_;
217 
219 
220  std::map<std::string, std::string> variables_;
221 
222  friend class FileGenerator;
224 };
225 
226 } // namespace cpp
227 } // namespace compiler
228 } // namespace protobuf
229 } // namespace google
230 
231 #endif // GOOGLE_PROTOBUF_COMPILER_CPP_MESSAGE_H__
google::protobuf::compiler::cpp::MessageGenerator::enum_generators_
std::vector< const EnumGenerator * > enum_generators_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:198
http2_test_server.format
format
Definition: http2_test_server.py:118
google::protobuf::compiler::cpp::MessageGenerator::field_generators_
FieldGeneratorMap field_generators_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:189
google::protobuf::compiler::cpp::MessageGenerator::optimized_order_
std::vector< const FieldDescriptor * > optimized_order_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:195
google::protobuf::compiler::cpp::MessageGenerator::message_layout_helper_
std::unique_ptr< MessageLayoutHelper > message_layout_helper_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:205
capstone.range
range
Definition: third_party/bloaty/third_party/capstone/bindings/python/capstone/__init__.py:6
google::protobuf::compiler::cpp::MessageGenerator::parse_function_generator_
std::unique_ptr< ParseFunctionGenerator > parse_function_generator_
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:216
options
double_dict options[]
Definition: capstone_test.c:55
google::protobuf::compiler::cpp::MessageGenerator::GenerateInlineMethods
void GenerateInlineMethods(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:1613
google::protobuf::compiler::cpp::MessageGenerator::GenerateParseTable
bool GenerateParseTable(io::Printer *printer, size_t offset, size_t aux_offset)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:1656
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
google::protobuf::compiler::cpp::MessageGenerator::GenerateByteSize
void GenerateByteSize(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3724
grpc::protobuf::io::Printer
GRPC_CUSTOM_PRINTER Printer
Definition: src/compiler/config.h:54
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
google::protobuf::compiler::cpp::MessageGenerator::inlined_string_indices_
std::vector< int > inlined_string_indices_
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:204
google::protobuf::compiler::cpp::MessageGenerator::GenerateFieldClear
void GenerateFieldClear(const FieldDescriptor *field, bool is_inline, Formatter format)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:904
google::protobuf::compiler::cpp::MessageGenerator::InlinedStringDonatedSize
size_t InlinedStringDonatedSize() const
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:774
Descriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:121
google::protobuf::compiler::cpp::MessageGenerator::max_inlined_string_index_
int max_inlined_string_index_
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:206
google::protobuf::compiler::cpp::MessageGenerator::classname_
std::string classname_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:187
google::protobuf::compiler::cpp::MessageGenerator::~MessageGenerator
~MessageGenerator()
google::protobuf::compiler::cpp::MessageGenerator::GenerateSourceInProto2Namespace
void GenerateSourceInProto2Namespace(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2806
google::protobuf::compiler::cpp::MessageGenerator::index_in_file_messages_
int index_in_file_messages_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:186
google::protobuf::compiler::cpp::MessageGenerator::descriptor_
const Descriptor * descriptor_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:185
google::protobuf::compiler::cpp::MessageGenerator::max_has_bit_index_
int max_has_bit_index_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:197
google::protobuf::compiler::cpp::MessageGenerator::GenerateSerializeOneofFields
void GenerateSerializeOneofFields(io::Printer *printer, const std::vector< const FieldDescriptor * > &fields)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3416
FieldDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:133
google::protobuf::compiler::cpp::MessageGenerator::extension_generators_
std::vector< const ExtensionGenerator * > extension_generators_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:199
google::protobuf::compiler::cpp::MessageGenerator::GenerateClassSpecificMergeFrom
void GenerateClassSpecificMergeFrom(io::Printer *printer)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3572
google::protobuf::compiler::cpp::MessageGenerator::GenerateStructors
void GenerateStructors(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2623
google::protobuf::compiler::cpp::MessageGenerator::HasWordIndex
int HasWordIndex(const FieldDescriptor *a) const
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:788
google::protobuf::compiler::cpp::MessageGenerator::GenerateSingularFieldHasBits
void GenerateSingularFieldHasBits(const FieldDescriptor *field, Formatter format)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:791
google::protobuf::compiler::cpp::MessageGenerator::GenerateClassDefinition
void GenerateClassDefinition(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:996
google::protobuf::compiler::cpp::MessageGenerator::GenerateOneofClear
void GenerateOneofClear(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3028
google::protobuf::compiler::cpp::MessageGenerator::GenerateSwap
void GenerateSwap(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3071
google::protobuf::compiler::cpp::MessageGenerator::num_weak_fields_
int num_weak_fields_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:201
google::protobuf::compiler::cpp::MessageGenerator::GenerateVerify
void GenerateVerify(io::Printer *printer)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3786
io
google::protobuf::compiler::cpp::MessageGenerator::HasByteIndex
int HasByteIndex(const FieldDescriptor *a) const
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:783
google::protobuf::compiler::cpp::MessageGenerator::HasBitsSize
size_t HasBitsSize() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:666
cpp
Definition: third_party/bloaty/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py:1
google::protobuf::compiler::cpp::MessageGenerator::has_bit_indices_
std::vector< int > has_bit_indices_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:196
google::protobuf::compiler::cpp::MessageGenerator::GenerateFieldMetadata
int GenerateFieldMetadata(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:1777
google::protobuf::compiler::cpp::MessageGenerator::SameHasByte
bool SameHasByte(const FieldDescriptor *a, const FieldDescriptor *b) const
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
google::protobuf::compiler::cpp::MessageGenerator::GenerateFieldAccessorDefinitions
void GenerateFieldAccessorDefinitions(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:944
cpp_parse_function_generator.h
google::protobuf::compiler::cpp::MessageGenerator::HasBitIndex
int HasBitIndex(const FieldDescriptor *a) const
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:778
google::protobuf::compiler::cpp::MessageGenerator::GenerateIsInitialized
void GenerateIsInitialized(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:4002
google::protobuf::compiler::cpp::MessageGenerator::AddGenerators
void AddGenerators(std::vector< std::unique_ptr< EnumGenerator >> *enum_generators, std::vector< std::unique_ptr< ExtensionGenerator >> *extension_generators)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:679
google::protobuf::compiler::cpp::MessageGenerator::RequiredFieldsBitMask
std::vector< uint32 > RequiredFieldsBitMask() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3686
google::protobuf::compiler::cpp::MessageGenerator::GenerateConstexprConstructor
void GenerateConstexprConstructor(io::Printer *printer)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2905
google::protobuf::compiler::cpp::MessageGenerator::num_required_fields_
int num_required_fields_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:200
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
google::protobuf::compiler::cpp::FileGenerator
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h:68
google::protobuf::compiler::cpp::MessageGenerator::GenerateClassMethods
void GenerateClassMethods(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2008
google::protobuf::compiler::cpp::MessageGenerator::GenerateOffsets
std::pair< size_t, size_t > GenerateOffsets(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2371
google::protobuf::compiler::cpp::MessageSCCAnalyzer
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:519
google::protobuf::compiler::cpp::MessageGenerator::variables_
std::map< std::string, std::string > variables_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:209
profile_analyzer.fields
list fields
Definition: profile_analyzer.py:266
google::protobuf::compiler::cpp::MessageGenerator::table_driven_
bool table_driven_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:203
google::protobuf::compiler::cpp::MessageGenerator::GenerateFieldAccessorDeclarations
void GenerateFieldAccessorDeclarations(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:694
google::protobuf::compiler::cpp::MessageGenerator::scc_analyzer_
MessageSCCAnalyzer * scc_analyzer_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:207
google::protobuf::compiler::cpp::MessageGenerator::GenerateClear
void GenerateClear(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2817
google::protobuf::compiler::cpp::MessageGenerator::options_
Options options_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:188
google::protobuf::compiler::cpp::MessageGenerator::GenerateOneofHasBits
void GenerateOneofHasBits(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:854
google::protobuf::compiler::cpp::MessageGenerator::GenerateSharedDestructorCode
void GenerateSharedDestructorCode(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2459
google::protobuf::compiler::cpp::MessageGenerator::GenerateSerializeOneExtensionRange
void GenerateSerializeOneExtensionRange(io::Printer *printer, const Descriptor::ExtensionRange *range)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3482
google::protobuf::compiler::cpp::MessageGenerator::GenerateSerializeWithCachedSizesToArray
void GenerateSerializeWithCachedSizesToArray(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3494
google::protobuf::compiler::cpp::MessageGenerator::GenerateCopyFrom
void GenerateCopyFrom(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3329
google::protobuf::compiler::cpp::MessageGenerator::GenerateSerializeWithCachedSizesBodyShuffled
void GenerateSerializeWithCachedSizesBodyShuffled(io::Printer *printer)
Definition: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:4141
google::protobuf::compiler::cpp::MessageGenerator::GenerateArenaDestructorCode
void GenerateArenaDestructorCode(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2491
google::protobuf::compiler::cpp::MessageGenerator::GenerateSchema
void GenerateSchema(io::Printer *printer, int offset, int has_offset)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:1717
google::protobuf::compiler::cpp::MessageGenerator::GenerateConstructorBody
void GenerateConstructorBody(io::Printer *printer, std::vector< bool > already_processed, bool copy_constructor) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2552
google::protobuf::compiler::cpp::MessageGenerator::MessageGenerator
MessageGenerator(const Descriptor *descriptor, const std::map< std::string, std::string > &vars, int index_in_file_messages, const Options &options, MessageSCCAnalyzer *scc_analyzer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:603
google::protobuf::compiler::cpp::MessageGenerator::GenerateSerializeOneField
void GenerateSerializeOneField(io::Printer *printer, const FieldDescriptor *field, int cached_has_bits_index)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3444
google::protobuf::compiler::cpp::MessageGenerator::GenerateParseAuxTable
size_t GenerateParseAuxTable(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2280
google::protobuf::compiler::cpp::MessageGenerator::GenerateSerializeWithCachedSizesBody
void GenerateSerializeWithCachedSizesBody(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3536
descriptor
static const char descriptor[1336]
Definition: certs.upbdefs.c:16
google::protobuf::compiler::cpp::MessageGenerator::GenerateSharedConstructorCode
void GenerateSharedConstructorCode(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2437
google::protobuf::compiler::cpp::MessageGenerator
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h:62
compiler
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.cc:21
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
google::protobuf::compiler::cpp::MessageGenerator::GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(MessageGenerator)
google::protobuf::compiler::cpp::MessageGenerator::GenerateParseOffsets
size_t GenerateParseOffsets(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:2173
google::protobuf::compiler::cpp::MessageGenerator::GenerateMergeFrom
void GenerateMergeFrom(io::Printer *printer)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:3117
google::protobuf::compiler::cpp::MessageGenerator::GenerateSerializeWithCachedSizes
void GenerateSerializeWithCachedSizes(io::Printer *printer)
offset
voidpf uLong offset
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:142
framework.helpers.highlighter.Formatter
Formatter
Definition: highlighter.py:53
google::protobuf::compiler::cpp::MessageGenerator::GenerateOneofMemberHasBits
void GenerateOneofMemberHasBits(const FieldDescriptor *field, const Formatter &format)
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc:870


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:05