protobuf/src/google/protobuf/descriptor.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 // This file contains classes which describe a type of protocol message.
36 // You can use a message's descriptor to learn at runtime what fields
37 // it contains and what the types of those fields are. The Message
38 // interface also allows you to dynamically access and modify individual
39 // fields by passing the FieldDescriptor of the field you are interested
40 // in.
41 //
42 // Most users will not care about descriptors, because they will write
43 // code specific to certain protocol types and will simply use the classes
44 // generated by the protocol compiler directly. Advanced users who want
45 // to operate on arbitrary types (not known at compile time) may want to
46 // read descriptors in order to learn about the contents of a message.
47 // A very small number of users will want to construct their own
48 // Descriptors, either because they are implementing Message manually or
49 // because they are writing something like the protocol compiler.
50 //
51 // For an example of how you might use descriptors, see the code example
52 // at the top of message.h.
53 
54 #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_H__
55 #define GOOGLE_PROTOBUF_DESCRIPTOR_H__
56 
57 #include <atomic>
58 #include <map>
59 #include <memory>
60 #include <set>
61 #include <string>
62 #include <vector>
63 
64 #include <google/protobuf/stubs/common.h>
65 #include <google/protobuf/stubs/logging.h>
66 #include <google/protobuf/stubs/mutex.h>
67 #include <google/protobuf/stubs/once.h>
68 #include <google/protobuf/port.h>
69 #include <google/protobuf/port_def.inc>
70 
71 // TYPE_BOOL is defined in the MacOS's ConditionalMacros.h.
72 #ifdef TYPE_BOOL
73 #undef TYPE_BOOL
74 #endif // TYPE_BOOL
75 
76 #ifdef SWIG
77 #define PROTOBUF_EXPORT
78 #endif
79 
80 
81 namespace google {
82 namespace protobuf {
83 
84 // Defined in this file.
85 class Descriptor;
86 class FieldDescriptor;
87 class OneofDescriptor;
88 class EnumDescriptor;
90 class ServiceDescriptor;
91 class MethodDescriptor;
92 class FileDescriptor;
93 class DescriptorDatabase;
94 class DescriptorPool;
95 
96 // Defined in descriptor.proto
97 class DescriptorProto;
101 class EnumDescriptorProto;
105 class FileDescriptorProto;
106 class MessageOptions;
107 class FieldOptions;
108 class OneofOptions;
109 class EnumOptions;
110 class EnumValueOptions;
112 class ServiceOptions;
113 class MethodOptions;
114 class FileOptions;
115 class UninterpretedOption;
116 class SourceCodeInfo;
117 
118 // Defined in message.h
119 class Message;
120 class Reflection;
121 
122 // Defined in descriptor.cc
123 class DescriptorBuilder;
124 class FileDescriptorTables;
125 class Symbol;
126 
127 // Defined in unknown_field_set.h.
128 class UnknownField;
129 
130 // Defined in command_line_interface.cc
131 namespace compiler {
132 class CommandLineInterface;
133 namespace cpp {
134 // Defined in helpers.h
135 class Formatter;
136 } // namespace cpp
137 } // namespace compiler
138 
139 namespace descriptor_unittest {
140 class DescriptorTest;
141 } // namespace descriptor_unittest
142 
143 // Defined in printer.h
144 namespace io {
145 class Printer;
146 } // namespace io
147 
148 // NB, all indices are zero-based.
149 struct SourceLocation {
150  int start_line;
151  int end_line;
152  int start_column;
153  int end_column;
154 
155  // Doc comments found at the source location.
156  // See the comments in SourceCodeInfo.Location (descriptor.proto) for details.
159  std::vector<std::string> leading_detached_comments;
160 };
161 
162 // Options when generating machine-parsable output from a descriptor with
163 // DebugString().
164 struct DebugStringOptions {
165  // include original user comments as recorded in SourceLocation entries. N.B.
166  // that this must be |false| by default: several other pieces of code (for
167  // example, the C++ code generation for fields in the proto compiler) rely on
168  // DebugString() output being unobstructed by user comments.
169  bool include_comments;
170  // If true, elide the braced body in the debug string.
171  bool elide_group_body;
172  bool elide_oneof_body;
173 
178  }
179 };
180 
181 // A class to handle the simplest cases of a lazily linked descriptor
182 // for a message type that isn't built at the time of cross linking,
183 // which is needed when a pool has lazily_build_dependencies_ set.
184 // Must be instantiated as mutable in a descriptor.
185 namespace internal {
186 
187 class PROTOBUF_EXPORT LazyDescriptor {
188  public:
189  // Init function to be called at init time of a descriptor containing
190  // a LazyDescriptor.
191  void Init() {
192  descriptor_ = nullptr;
193  once_ = nullptr;
194  }
195 
196  // Sets the value of the descriptor if it is known during the descriptor
197  // building process. Not thread safe, should only be called during the
198  // descriptor build process. Should not be called after SetLazy has been
199  // called.
200  void Set(const Descriptor* descriptor);
201 
202  // Sets the information needed to lazily cross link the descriptor at a later
203  // time, SetLazy is not thread safe, should be called only once at descriptor
204  // build time if the symbol wasn't found and building of the file containing
205  // that type is delayed because lazily_build_dependencies_ is set on the pool.
206  // Should not be called after Set() has been called.
207  void SetLazy(StringPiece name, const FileDescriptor* file);
208 
209  // Returns the current value of the descriptor, thread-safe. If SetLazy(...)
210  // has been called, will do a one-time cross link of the type specified,
211  // building the descriptor file that contains the type if necessary.
212  inline const Descriptor* Get(const ServiceDescriptor* service) {
213  Once(service);
214  return descriptor_;
215  }
216 
217  private:
218  void Once(const ServiceDescriptor* service);
219 
220  union {
221  const Descriptor* descriptor_;
222  const char* lazy_name_;
223  };
224  internal::once_flag* once_;
225 };
226 
227 class PROTOBUF_EXPORT SymbolBase {
228  private:
231 };
232 
233 // Some types have more than one SymbolBase because they have multiple
234 // identities in the table. We can't have duplicate direct bases, so we use this
235 // intermediate base to do so.
236 // See BuildEnumValue for details.
237 template <int N>
238 class PROTOBUF_EXPORT SymbolBaseN : public SymbolBase {};
239 
240 } // namespace internal
241 
242 // Describes a type of protocol message, or a particular group within a
243 // message. To obtain the Descriptor for a given message object, call
244 // Message::GetDescriptor(). Generated message classes also have a
245 // static method called descriptor() which returns the type's descriptor.
246 // Use DescriptorPool to construct your own descriptors.
247 class PROTOBUF_EXPORT Descriptor : private internal::SymbolBase {
248  public:
250 
251  // The name of the message type, not including its scope.
252  const std::string& name() const;
253 
254  // The fully-qualified name of the message type, scope delimited by
255  // periods. For example, message type "Foo" which is declared in package
256  // "bar" has full name "bar.Foo". If a type "Baz" is nested within
257  // Foo, Baz's full_name is "bar.Foo.Baz". To get only the part that
258  // comes after the last '.', use name().
259  const std::string& full_name() const;
260 
261  // Index of this descriptor within the file or containing type's message
262  // type array.
263  int index() const;
264 
265  // The .proto file in which this message type was defined. Never nullptr.
266  const FileDescriptor* file() const;
267 
268  // If this Descriptor describes a nested type, this returns the type
269  // in which it is nested. Otherwise, returns nullptr.
270  const Descriptor* containing_type() const;
271 
272  // Get options for this message type. These are specified in the .proto file
273  // by placing lines like "option foo = 1234;" in the message definition.
274  // Allowed options are defined by MessageOptions in descriptor.proto, and any
275  // available extensions of that message.
276  const MessageOptions& options() const;
277 
278  // Write the contents of this Descriptor into the given DescriptorProto.
279  // The target DescriptorProto must be clear before calling this; if it
280  // isn't, the result may be garbage.
281  void CopyTo(DescriptorProto* proto) const;
282 
283  // Write the contents of this descriptor in a human-readable form. Output
284  // will be suitable for re-parsing.
285  std::string DebugString() const;
286 
287  // Similar to DebugString(), but additionally takes options (e.g.,
288  // include original user comments in output).
289  std::string DebugStringWithOptions(const DebugStringOptions& options) const;
290 
291  // Returns true if this is a placeholder for an unknown type. This will
292  // only be the case if this descriptor comes from a DescriptorPool
293  // with AllowUnknownDependencies() set.
294  bool is_placeholder() const;
295 
297  WELLKNOWNTYPE_UNSPECIFIED, // Not a well-known type.
298 
299  // Wrapper types.
300  WELLKNOWNTYPE_DOUBLEVALUE, // google.protobuf.DoubleValue
301  WELLKNOWNTYPE_FLOATVALUE, // google.protobuf.FloatValue
302  WELLKNOWNTYPE_INT64VALUE, // google.protobuf.Int64Value
303  WELLKNOWNTYPE_UINT64VALUE, // google.protobuf.UInt64Value
304  WELLKNOWNTYPE_INT32VALUE, // google.protobuf.Int32Value
305  WELLKNOWNTYPE_UINT32VALUE, // google.protobuf.UInt32Value
306  WELLKNOWNTYPE_STRINGVALUE, // google.protobuf.StringValue
307  WELLKNOWNTYPE_BYTESVALUE, // google.protobuf.BytesValue
308  WELLKNOWNTYPE_BOOLVALUE, // google.protobuf.BoolValue
309 
310  // Other well known types.
311  WELLKNOWNTYPE_ANY, // google.protobuf.Any
312  WELLKNOWNTYPE_FIELDMASK, // google.protobuf.FieldMask
313  WELLKNOWNTYPE_DURATION, // google.protobuf.Duration
314  WELLKNOWNTYPE_TIMESTAMP, // google.protobuf.Timestamp
315  WELLKNOWNTYPE_VALUE, // google.protobuf.Value
316  WELLKNOWNTYPE_LISTVALUE, // google.protobuf.ListValue
317  WELLKNOWNTYPE_STRUCT, // google.protobuf.Struct
318 
319  // New well-known types may be added in the future.
320  // Please make sure any switch() statements have a 'default' case.
322  };
323 
324  WellKnownType well_known_type() const;
325 
326  // Field stuff -----------------------------------------------------
327 
328  // The number of fields in this message type.
329  int field_count() const;
330  // Gets a field by index, where 0 <= index < field_count().
331  // These are returned in the order they were defined in the .proto file.
332  const FieldDescriptor* field(int index) const;
333 
334  // Looks up a field by declared tag number. Returns nullptr if no such field
335  // exists.
336  const FieldDescriptor* FindFieldByNumber(int number) const;
337  // Looks up a field by name. Returns nullptr if no such field exists.
339 
340  // Looks up a field by lowercased name (as returned by lowercase_name()).
341  // This lookup may be ambiguous if multiple field names differ only by case,
342  // in which case the field returned is chosen arbitrarily from the matches.
343  const FieldDescriptor* FindFieldByLowercaseName(
344  ConstStringParam lowercase_name) const;
345 
346  // Looks up a field by camel-case name (as returned by camelcase_name()).
347  // This lookup may be ambiguous if multiple field names differ in a way that
348  // leads them to have identical camel-case names, in which case the field
349  // returned is chosen arbitrarily from the matches.
350  const FieldDescriptor* FindFieldByCamelcaseName(
351  ConstStringParam camelcase_name) const;
352 
353  // The number of oneofs in this message type.
354  int oneof_decl_count() const;
355  // The number of oneofs in this message type, excluding synthetic oneofs.
356  // Real oneofs always come first, so iterating up to real_oneof_decl_cout()
357  // will yield all real oneofs.
358  int real_oneof_decl_count() const;
359  // Get a oneof by index, where 0 <= index < oneof_decl_count().
360  // These are returned in the order they were defined in the .proto file.
361  const OneofDescriptor* oneof_decl(int index) const;
362 
363  // Looks up a oneof by name. Returns nullptr if no such oneof exists.
365 
366  // Nested type stuff -----------------------------------------------
367 
368  // The number of nested types in this message type.
369  int nested_type_count() const;
370  // Gets a nested type by index, where 0 <= index < nested_type_count().
371  // These are returned in the order they were defined in the .proto file.
372  const Descriptor* nested_type(int index) const;
373 
374  // Looks up a nested type by name. Returns nullptr if no such nested type
375  // exists.
376  const Descriptor* FindNestedTypeByName(ConstStringParam name) const;
377 
378  // Enum stuff ------------------------------------------------------
379 
380  // The number of enum types in this message type.
381  int enum_type_count() const;
382  // Gets an enum type by index, where 0 <= index < enum_type_count().
383  // These are returned in the order they were defined in the .proto file.
384  const EnumDescriptor* enum_type(int index) const;
385 
386  // Looks up an enum type by name. Returns nullptr if no such enum type
387  // exists.
389 
390  // Looks up an enum value by name, among all enum types in this message.
391  // Returns nullptr if no such value exists.
392  const EnumValueDescriptor* FindEnumValueByName(ConstStringParam name) const;
393 
394  // Extensions ------------------------------------------------------
395 
396  // A range of field numbers which are designated for third-party
397  // extensions.
398  struct ExtensionRange {
400 
402 
403  // See Descriptor::CopyTo().
404  void CopyTo(DescriptorProto_ExtensionRange* proto) const;
405 
406  int start; // inclusive
407  int end; // exclusive
408 
410  };
411 
412  // The number of extension ranges in this message type.
413  int extension_range_count() const;
414  // Gets an extension range by index, where 0 <= index <
415  // extension_range_count(). These are returned in the order they were defined
416  // in the .proto file.
417  const ExtensionRange* extension_range(int index) const;
418 
419  // Returns true if the number is in one of the extension ranges.
420  bool IsExtensionNumber(int number) const;
421 
422  // Returns nullptr if no extension range contains the given number.
423  const ExtensionRange* FindExtensionRangeContainingNumber(int number) const;
424 
425  // The number of extensions defined nested within this message type's scope.
426  // See doc:
427  // https://developers.google.com/protocol-buffers/docs/proto#nested-extensions
428  //
429  // Note that the extensions may be extending *other* messages.
430  //
431  // For example:
432  // message M1 {
433  // extensions 1 to max;
434  // }
435  //
436  // message M2 {
437  // extend M1 {
438  // optional int32 foo = 1;
439  // }
440  // }
441  //
442  // In this case,
443  // DescriptorPool::generated_pool()
444  // ->FindMessageTypeByName("M2")
445  // ->extension(0)
446  // will return "foo", even though "foo" is an extension of M1.
447  // To find all known extensions of a given message, instead use
448  // DescriptorPool::FindAllExtensions.
449  int extension_count() const;
450  // Get an extension by index, where 0 <= index < extension_count().
451  // These are returned in the order they were defined in the .proto file.
452  const FieldDescriptor* extension(int index) const;
453 
454  // Looks up a named extension (which extends some *other* message type)
455  // defined within this message type's scope.
457 
458  // Similar to FindFieldByLowercaseName(), but finds extensions defined within
459  // this message type's scope.
460  const FieldDescriptor* FindExtensionByLowercaseName(
461  ConstStringParam name) const;
462 
463  // Similar to FindFieldByCamelcaseName(), but finds extensions defined within
464  // this message type's scope.
465  const FieldDescriptor* FindExtensionByCamelcaseName(
466  ConstStringParam name) const;
467 
468  // Reserved fields -------------------------------------------------
469 
470  // A range of reserved field numbers.
471  struct ReservedRange {
472  int start; // inclusive
473  int end; // exclusive
474  };
475 
476  // The number of reserved ranges in this message type.
477  int reserved_range_count() const;
478  // Gets an reserved range by index, where 0 <= index <
479  // reserved_range_count(). These are returned in the order they were defined
480  // in the .proto file.
481  const ReservedRange* reserved_range(int index) const;
482 
483  // Returns true if the number is in one of the reserved ranges.
484  bool IsReservedNumber(int number) const;
485 
486  // Returns nullptr if no reserved range contains the given number.
487  const ReservedRange* FindReservedRangeContainingNumber(int number) const;
488 
489  // The number of reserved field names in this message type.
490  int reserved_name_count() const;
491 
492  // Gets a reserved name by index, where 0 <= index < reserved_name_count().
493  const std::string& reserved_name(int index) const;
494 
495  // Returns true if the field name is reserved.
496  bool IsReservedName(ConstStringParam name) const;
497 
498  // Source Location ---------------------------------------------------
499 
500  // Updates |*out_location| to the source location of the complete
501  // extent of this message declaration. Returns false and leaves
502  // |*out_location| unchanged iff location information was not available.
503  bool GetSourceLocation(SourceLocation* out_location) const;
504 
505  // Maps --------------------------------------------------------------
506 
507  // Returns the FieldDescriptor for the "key" field. If this isn't a map entry
508  // field, returns nullptr.
509  const FieldDescriptor* map_key() const;
510 
511  // Returns the FieldDescriptor for the "value" field. If this isn't a map
512  // entry field, returns nullptr.
513  const FieldDescriptor* map_value() const;
514 
515  private:
516  friend class Symbol;
518 
519  // Allows tests to test CopyTo(proto, true).
521 
522  // Allows access to GetLocationPath for annotations.
523  friend class io::Printer;
524  friend class compiler::cpp::Formatter;
525 
526  // Fill the json_name field of FieldDescriptorProto.
527  void CopyJsonNameTo(DescriptorProto* proto) const;
528 
529  // Internal version of DebugString; controls the level of indenting for
530  // correct depth. Takes |options| to control debug-string options, and
531  // |include_opening_clause| to indicate whether the "message ... " part of the
532  // clause has already been generated (this varies depending on context).
535  bool include_opening_clause) const;
536 
537  // Walks up the descriptor tree to generate the source location path
538  // to this descriptor from the file root.
539  void GetLocationPath(std::vector<int>* output) const;
540 
541  // True if this is a placeholder for an unknown type.
542  bool is_placeholder_ : 1;
543  // True if this is a placeholder and the type name wasn't fully-qualified.
544  bool is_unqualified_placeholder_ : 1;
545  // Well known type. Stored like this to conserve space.
547 
548  // This points to the last field _number_ that is part of the sequence
549  // starting at 1, where
550  // `desc->field(i)->number() == i + 1`
551  // A value of `0` means no field matches. That is, there are no fields or the
552  // first field is not field `1`.
553  // Uses 16-bit to avoid extra padding. Unlikely to have more than 2^16
554  // sequentially numbered fields in a message.
556 
557  int field_count_;
558 
559  // all_names_ = [name, full_name]
561  const FileDescriptor* file_;
562  const Descriptor* containing_type_;
563  const MessageOptions* options_;
564 
565  // These arrays are separated from their sizes to minimize padding on 64-bit.
567  OneofDescriptor* oneof_decls_;
568  Descriptor* nested_types_;
569  EnumDescriptor* enum_types_;
570  ExtensionRange* extension_ranges_;
571  FieldDescriptor* extensions_;
572  ReservedRange* reserved_ranges_;
573  const std::string** reserved_names_;
574 
575  int oneof_decl_count_;
577  int nested_type_count_;
578  int enum_type_count_;
579  int extension_range_count_;
580  int extension_count_;
581  int reserved_range_count_;
582  int reserved_name_count_;
583 
584  // IMPORTANT: If you add a new field, make sure to search for all instances
585  // of Allocate<Descriptor>() and AllocateArray<Descriptor>() in descriptor.cc
586  // and update them to initialize the field.
587 
588  // Must be constructed using DescriptorPool.
590  friend class DescriptorBuilder;
591  friend class DescriptorPool;
592  friend class EnumDescriptor;
593  friend class FieldDescriptor;
594  friend class FileDescriptorTables;
595  friend class OneofDescriptor;
596  friend class MethodDescriptor;
597  friend class FileDescriptor;
599 };
600 
601 
602 // Describes a single field of a message. To get the descriptor for a given
603 // field, first get the Descriptor for the message in which it is defined,
604 // then call Descriptor::FindFieldByName(). To get a FieldDescriptor for
605 // an extension, do one of the following:
606 // - Get the Descriptor or FileDescriptor for its containing scope, then
607 // call Descriptor::FindExtensionByName() or
608 // FileDescriptor::FindExtensionByName().
609 // - Given a DescriptorPool, call DescriptorPool::FindExtensionByNumber() or
610 // DescriptorPool::FindExtensionByPrintableName().
611 // Use DescriptorPool to construct your own descriptors.
612 class PROTOBUF_EXPORT FieldDescriptor : private internal::SymbolBase {
613  public:
615 
616  // Identifies a field type. 0 is reserved for errors. The order is weird
617  // for historical reasons. Types 12 and up are new in proto2.
618  enum Type {
619  TYPE_DOUBLE = 1, // double, exactly eight bytes on the wire.
620  TYPE_FLOAT = 2, // float, exactly four bytes on the wire.
621  TYPE_INT64 = 3, // int64, varint on the wire. Negative numbers
622  // take 10 bytes. Use TYPE_SINT64 if negative
623  // values are likely.
624  TYPE_UINT64 = 4, // uint64, varint on the wire.
625  TYPE_INT32 = 5, // int32, varint on the wire. Negative numbers
626  // take 10 bytes. Use TYPE_SINT32 if negative
627  // values are likely.
628  TYPE_FIXED64 = 6, // uint64, exactly eight bytes on the wire.
629  TYPE_FIXED32 = 7, // uint32, exactly four bytes on the wire.
630  TYPE_BOOL = 8, // bool, varint on the wire.
631  TYPE_STRING = 9, // UTF-8 text.
632  TYPE_GROUP = 10, // Tag-delimited message. Deprecated.
633  TYPE_MESSAGE = 11, // Length-delimited message.
634 
635  TYPE_BYTES = 12, // Arbitrary byte array.
636  TYPE_UINT32 = 13, // uint32, varint on the wire
637  TYPE_ENUM = 14, // Enum, varint on the wire
638  TYPE_SFIXED32 = 15, // int32, exactly four bytes on the wire
639  TYPE_SFIXED64 = 16, // int64, exactly eight bytes on the wire
640  TYPE_SINT32 = 17, // int32, ZigZag-encoded varint on the wire
641  TYPE_SINT64 = 18, // int64, ZigZag-encoded varint on the wire
642 
643  MAX_TYPE = 18, // Constant useful for defining lookup tables
644  // indexed by Type.
645  };
646 
647  // Specifies the C++ data type used to represent the field. There is a
648  // fixed mapping from Type to CppType where each Type maps to exactly one
649  // CppType. 0 is reserved for errors.
650  enum CppType {
651  CPPTYPE_INT32 = 1, // TYPE_INT32, TYPE_SINT32, TYPE_SFIXED32
652  CPPTYPE_INT64 = 2, // TYPE_INT64, TYPE_SINT64, TYPE_SFIXED64
653  CPPTYPE_UINT32 = 3, // TYPE_UINT32, TYPE_FIXED32
654  CPPTYPE_UINT64 = 4, // TYPE_UINT64, TYPE_FIXED64
655  CPPTYPE_DOUBLE = 5, // TYPE_DOUBLE
656  CPPTYPE_FLOAT = 6, // TYPE_FLOAT
657  CPPTYPE_BOOL = 7, // TYPE_BOOL
658  CPPTYPE_ENUM = 8, // TYPE_ENUM
659  CPPTYPE_STRING = 9, // TYPE_STRING, TYPE_BYTES
660  CPPTYPE_MESSAGE = 10, // TYPE_MESSAGE, TYPE_GROUP
661 
662  MAX_CPPTYPE = 10, // Constant useful for defining lookup tables
663  // indexed by CppType.
664  };
665 
666  // Identifies whether the field is optional, required, or repeated. 0 is
667  // reserved for errors.
668  enum Label {
669  LABEL_OPTIONAL = 1, // optional
670  LABEL_REQUIRED = 2, // required
671  LABEL_REPEATED = 3, // repeated
672 
673  MAX_LABEL = 3, // Constant useful for defining lookup tables
674  // indexed by Label.
675  };
676 
677  // Valid field numbers are positive integers up to kMaxNumber.
678  static const int kMaxNumber = (1 << 29) - 1;
679 
680  // First field number reserved for the protocol buffer library implementation.
681  // Users may not declare fields that use reserved numbers.
682  static const int kFirstReservedNumber = 19000;
683  // Last field number reserved for the protocol buffer library implementation.
684  // Users may not declare fields that use reserved numbers.
685  static const int kLastReservedNumber = 19999;
686 
687  const std::string& name() const; // Name of this field within the message.
688  const std::string& full_name() const; // Fully-qualified name of the field.
689  const std::string& json_name() const; // JSON name of this field.
690  const FileDescriptor* file() const; // File in which this field was defined.
691  bool is_extension() const; // Is this an extension field?
692  int number() const; // Declared tag number.
693 
694  // Same as name() except converted to lower-case. This (and especially the
695  // FindFieldByLowercaseName() method) can be useful when parsing formats
696  // which prefer to use lowercase naming style. (Although, technically
697  // field names should be lowercased anyway according to the protobuf style
698  // guide, so this only makes a difference when dealing with old .proto files
699  // which do not follow the guide.)
700  const std::string& lowercase_name() const;
701 
702  // Same as name() except converted to camel-case. In this conversion, any
703  // time an underscore appears in the name, it is removed and the next
704  // letter is capitalized. Furthermore, the first letter of the name is
705  // lower-cased. Examples:
706  // FooBar -> fooBar
707  // foo_bar -> fooBar
708  // fooBar -> fooBar
709  // This (and especially the FindFieldByCamelcaseName() method) can be useful
710  // when parsing formats which prefer to use camel-case naming style.
711  const std::string& camelcase_name() const;
712 
713  Type type() const; // Declared type of this field.
714  const char* type_name() const; // Name of the declared type.
715  CppType cpp_type() const; // C++ type of this field.
716  const char* cpp_type_name() const; // Name of the C++ type.
717  Label label() const; // optional/required/repeated
718 
719  bool is_required() const; // shorthand for label() == LABEL_REQUIRED
720  bool is_optional() const; // shorthand for label() == LABEL_OPTIONAL
721  bool is_repeated() const; // shorthand for label() == LABEL_REPEATED
722  bool is_packable() const; // shorthand for is_repeated() &&
723  // IsTypePackable(type())
724  bool is_packed() const; // shorthand for is_packable() &&
725  // options().packed()
726  bool is_map() const; // shorthand for type() == TYPE_MESSAGE &&
727  // message_type()->options().map_entry()
728 
729  // Returns true if this field was syntactically written with "optional" in the
730  // .proto file. Excludes singular proto3 fields that do not have a label.
731  bool has_optional_keyword() const;
732 
733  // Returns true if this field tracks presence, ie. does the field
734  // distinguish between "unset" and "present with default value."
735  // This includes required, optional, and oneof fields. It excludes maps,
736  // repeated fields, and singular proto3 fields without "optional".
737  //
738  // For fields where has_presence() == true, the return value of
739  // Reflection::HasField() is semantically meaningful.
740  bool has_presence() const;
741 
742  // Index of this field within the message's field array, or the file or
743  // extension scope's extensions array.
744  int index() const;
745 
746  // Does this field have an explicitly-declared default value?
747  bool has_default_value() const;
748 
749  // Whether the user has specified the json_name field option in the .proto
750  // file.
751  bool has_json_name() const;
752 
753  // Get the field default value if cpp_type() == CPPTYPE_INT32. If no
754  // explicit default was defined, the default is 0.
755  int32_t default_value_int32_t() const;
756  int32_t default_value_int32() const { return default_value_int32_t(); }
757  // Get the field default value if cpp_type() == CPPTYPE_INT64. If no
758  // explicit default was defined, the default is 0.
759  int64_t default_value_int64_t() const;
760  int64_t default_value_int64() const { return default_value_int64_t(); }
761  // Get the field default value if cpp_type() == CPPTYPE_UINT32. If no
762  // explicit default was defined, the default is 0.
763  uint32_t default_value_uint32_t() const;
764  uint32_t default_value_uint32() const { return default_value_uint32_t(); }
765  // Get the field default value if cpp_type() == CPPTYPE_UINT64. If no
766  // explicit default was defined, the default is 0.
767  uint64_t default_value_uint64_t() const;
768  uint64_t default_value_uint64() const { return default_value_uint64_t(); }
769  // Get the field default value if cpp_type() == CPPTYPE_FLOAT. If no
770  // explicit default was defined, the default is 0.0.
771  float default_value_float() const;
772  // Get the field default value if cpp_type() == CPPTYPE_DOUBLE. If no
773  // explicit default was defined, the default is 0.0.
774  double default_value_double() const;
775  // Get the field default value if cpp_type() == CPPTYPE_BOOL. If no
776  // explicit default was defined, the default is false.
777  bool default_value_bool() const;
778  // Get the field default value if cpp_type() == CPPTYPE_ENUM. If no
779  // explicit default was defined, the default is the first value defined
780  // in the enum type (all enum types are required to have at least one value).
781  // This never returns nullptr.
782  const EnumValueDescriptor* default_value_enum() const;
783  // Get the field default value if cpp_type() == CPPTYPE_STRING. If no
784  // explicit default was defined, the default is the empty string.
785  const std::string& default_value_string() const;
786 
787  // The Descriptor for the message of which this is a field. For extensions,
788  // this is the extended type. Never nullptr.
789  const Descriptor* containing_type() const;
790 
791  // If the field is a member of a oneof, this is the one, otherwise this is
792  // nullptr.
793  const OneofDescriptor* containing_oneof() const;
794 
795  // If the field is a member of a non-synthetic oneof, returns the descriptor
796  // for the oneof, otherwise returns nullptr.
797  const OneofDescriptor* real_containing_oneof() const;
798 
799  // If the field is a member of a oneof, returns the index in that oneof.
800  int index_in_oneof() const;
801 
802  // An extension may be declared within the scope of another message. If this
803  // field is an extension (is_extension() is true), then extension_scope()
804  // returns that message, or nullptr if the extension was declared at global
805  // scope. If this is not an extension, extension_scope() is undefined (may
806  // assert-fail).
807  const Descriptor* extension_scope() const;
808 
809  // If type is TYPE_MESSAGE or TYPE_GROUP, returns a descriptor for the
810  // message or the group type. Otherwise, returns null.
811  const Descriptor* message_type() const;
812  // If type is TYPE_ENUM, returns a descriptor for the enum. Otherwise,
813  // returns null.
814  const EnumDescriptor* enum_type() const;
815 
816  // Get the FieldOptions for this field. This includes things listed in
817  // square brackets after the field definition. E.g., the field:
818  // optional string text = 1 [ctype=CORD];
819  // has the "ctype" option set. Allowed options are defined by FieldOptions in
820  // descriptor.proto, and any available extensions of that message.
821  const FieldOptions& options() const;
822 
823  // See Descriptor::CopyTo().
824  void CopyTo(FieldDescriptorProto* proto) const;
825 
826  // See Descriptor::DebugString().
827  std::string DebugString() const;
828 
829  // See Descriptor::DebugStringWithOptions().
830  std::string DebugStringWithOptions(const DebugStringOptions& options) const;
831 
832  // Helper method to get the CppType for a particular Type.
833  static CppType TypeToCppType(Type type);
834 
835  // Helper method to get the name of a Type.
836  static const char* TypeName(Type type);
837 
838  // Helper method to get the name of a CppType.
839  static const char* CppTypeName(CppType cpp_type);
840 
841  // Return true iff [packed = true] is valid for fields of this type.
842  static inline bool IsTypePackable(Type field_type);
843 
844  // Returns full_name() except if the field is a MessageSet extension,
845  // in which case it returns the full_name() of the containing message type
846  // for backwards compatibility with proto1.
847  //
848  // A MessageSet extension is defined as an optional message extension
849  // whose containing type has the message_set_wire_format option set.
850  // This should be true of extensions of google.protobuf.bridge.MessageSet;
851  // by convention, such extensions are named "message_set_extension".
852  //
853  // The opposite operation (looking up an extension's FieldDescriptor given
854  // its printable name) can be accomplished with
855  // message->file()->pool()->FindExtensionByPrintableName(message, name)
856  // where the extension extends "message".
857  const std::string& PrintableNameForExtension() const;
858 
859  // Source Location ---------------------------------------------------
860 
861  // Updates |*out_location| to the source location of the complete
862  // extent of this field declaration. Returns false and leaves
863  // |*out_location| unchanged iff location information was not available.
864  bool GetSourceLocation(SourceLocation* out_location) const;
865 
866  private:
867  friend class Symbol;
869 
870  // Allows access to GetLocationPath for annotations.
871  friend class io::Printer;
872  friend class compiler::cpp::Formatter;
873  friend class Reflection;
874 
875  // Fill the json_name field of FieldDescriptorProto.
876  void CopyJsonNameTo(FieldDescriptorProto* proto) const;
877 
878  // See Descriptor::DebugString().
880  const DebugStringOptions& options) const;
881 
882  // formats the default value appropriately and returns it as a string.
883  // Must have a default value to call this. If quote_string_type is true, then
884  // types of CPPTYPE_STRING whill be surrounded by quotes and CEscaped.
885  std::string DefaultValueAsString(bool quote_string_type) const;
886 
887  // Helper function that returns the field type name for DebugString.
888  std::string FieldTypeNameDebugString() const;
889 
890  // Walks up the descriptor tree to generate the source location path
891  // to this descriptor from the file root.
892  void GetLocationPath(std::vector<int>* output) const;
893 
894  // Returns true if this is a map message type.
895  bool is_map_message_type() const;
896 
897  bool has_default_value_ : 1;
899  // Whether the user has specified the json_name field option in the .proto
900  // file.
901  bool has_json_name_ : 1;
902  bool is_extension_ : 1;
903  bool is_oneof_ : 1;
904 
905  // Actually a `Label` but stored as uint8_t to save space.
907 
908  // Actually a `Type`, but stored as uint8_t to save space.
909  mutable uint8_t type_;
910 
911  // Logically:
912  // all_names_ = [name, full_name, lower, camel, json]
913  // However:
914  // duplicates will be omitted, so lower/camel/json might be in the same
915  // position.
916  // We store the true offset for each name here, and the bit width must be
917  // large enough to account for the worst case where all names are present.
921  // Sadly, `number_` located here to reduce padding. Unrelated to all_names_
922  // and its indices above.
923  int number_;
925  const FileDescriptor* file_;
926 
927  internal::once_flag* type_once_;
928  static void TypeOnceInit(const FieldDescriptor* to_init);
929  void InternalTypeOnceInit() const;
930  const Descriptor* containing_type_;
931  union {
934  } scope_;
935  union {
936  mutable const Descriptor* message_type;
937  mutable const EnumDescriptor* enum_type;
938  const char* lazy_type_name;
939  } type_descriptor_;
940  const FieldOptions* options_;
941  // IMPORTANT: If you add a new field, make sure to search for all instances
942  // of Allocate<FieldDescriptor>() and AllocateArray<FieldDescriptor>() in
943  // descriptor.cc and update them to initialize the field.
944 
945  union {
950  float default_value_float_;
951  double default_value_double_;
952  bool default_value_bool_;
953 
954  mutable const EnumValueDescriptor* default_value_enum_;
956  const std::string* default_value_string_;
957  mutable std::atomic<const Message*> default_generated_instance_;
958  };
959 
960  static const CppType kTypeToCppTypeMap[MAX_TYPE + 1];
961 
962  static const char* const kTypeToName[MAX_TYPE + 1];
963 
964  static const char* const kCppTypeToName[MAX_CPPTYPE + 1];
965 
966  static const char* const kLabelToName[MAX_LABEL + 1];
967 
968  // Must be constructed using DescriptorPool.
970  friend class DescriptorBuilder;
971  friend class FileDescriptor;
972  friend class Descriptor;
973  friend class OneofDescriptor;
975 };
976 
977 
978 // Describes a oneof defined in a message type.
979 class PROTOBUF_EXPORT OneofDescriptor : private internal::SymbolBase {
980  public:
982 
983  const std::string& name() const; // Name of this oneof.
984  const std::string& full_name() const; // Fully-qualified name of the oneof.
985 
986  // Index of this oneof within the message's oneof array.
987  int index() const;
988 
989  // Returns whether this oneof was inserted by the compiler to wrap a proto3
990  // optional field. If this returns true, code generators should *not* emit it.
991  bool is_synthetic() const;
992 
993  // The .proto file in which this oneof was defined. Never nullptr.
994  const FileDescriptor* file() const;
995  // The Descriptor for the message containing this oneof.
996  const Descriptor* containing_type() const;
997 
998  // The number of (non-extension) fields which are members of this oneof.
999  int field_count() const;
1000  // Get a member of this oneof, in the order in which they were declared in the
1001  // .proto file. Does not include extensions.
1002  const FieldDescriptor* field(int index) const;
1003 
1004  const OneofOptions& options() const;
1005 
1006  // See Descriptor::CopyTo().
1007  void CopyTo(OneofDescriptorProto* proto) const;
1008 
1009  // See Descriptor::DebugString().
1010  std::string DebugString() const;
1011 
1012  // See Descriptor::DebugStringWithOptions().
1013  std::string DebugStringWithOptions(const DebugStringOptions& options) const;
1014 
1015  // Source Location ---------------------------------------------------
1016 
1017  // Updates |*out_location| to the source location of the complete
1018  // extent of this oneof declaration. Returns false and leaves
1019  // |*out_location| unchanged iff location information was not available.
1020  bool GetSourceLocation(SourceLocation* out_location) const;
1021 
1022  private:
1023  friend class Symbol;
1025 
1026  // Allows access to GetLocationPath for annotations.
1027  friend class io::Printer;
1028  friend class compiler::cpp::Formatter;
1029 
1030  // See Descriptor::DebugString().
1032  const DebugStringOptions& options) const;
1033 
1034  // Walks up the descriptor tree to generate the source location path
1035  // to this descriptor from the file root.
1036  void GetLocationPath(std::vector<int>* output) const;
1037 
1038  int field_count_;
1039 
1040  // all_names_ = [name, full_name]
1042  const Descriptor* containing_type_;
1043  const OneofOptions* options_;
1045 
1046  // IMPORTANT: If you add a new field, make sure to search for all instances
1047  // of Allocate<OneofDescriptor>() and AllocateArray<OneofDescriptor>()
1048  // in descriptor.cc and update them to initialize the field.
1049 
1050  // Must be constructed using DescriptorPool.
1052  friend class DescriptorBuilder;
1053  friend class Descriptor;
1055 };
1056 
1057 // Describes an enum type defined in a .proto file. To get the EnumDescriptor
1058 // for a generated enum type, call TypeName_descriptor(). Use DescriptorPool
1059 // to construct your own descriptors.
1060 class PROTOBUF_EXPORT EnumDescriptor : private internal::SymbolBase {
1061  public:
1063 
1064  // The name of this enum type in the containing scope.
1065  const std::string& name() const;
1066 
1067  // The fully-qualified name of the enum type, scope delimited by periods.
1068  const std::string& full_name() const;
1069 
1070  // Index of this enum within the file or containing message's enum array.
1071  int index() const;
1072 
1073  // The .proto file in which this enum type was defined. Never nullptr.
1074  const FileDescriptor* file() const;
1075 
1076  // The number of values for this EnumDescriptor. Guaranteed to be greater
1077  // than zero.
1078  int value_count() const;
1079  // Gets a value by index, where 0 <= index < value_count().
1080  // These are returned in the order they were defined in the .proto file.
1081  const EnumValueDescriptor* value(int index) const;
1082 
1083  // Looks up a value by name. Returns nullptr if no such value exists.
1084  const EnumValueDescriptor* FindValueByName(ConstStringParam name) const;
1085  // Looks up a value by number. Returns nullptr if no such value exists. If
1086  // multiple values have this number, the first one defined is returned.
1087  const EnumValueDescriptor* FindValueByNumber(int number) const;
1088 
1089  // If this enum type is nested in a message type, this is that message type.
1090  // Otherwise, nullptr.
1091  const Descriptor* containing_type() const;
1092 
1093  // Get options for this enum type. These are specified in the .proto file by
1094  // placing lines like "option foo = 1234;" in the enum definition. Allowed
1095  // options are defined by EnumOptions in descriptor.proto, and any available
1096  // extensions of that message.
1097  const EnumOptions& options() const;
1098 
1099  // See Descriptor::CopyTo().
1100  void CopyTo(EnumDescriptorProto* proto) const;
1101 
1102  // See Descriptor::DebugString().
1103  std::string DebugString() const;
1104 
1105  // See Descriptor::DebugStringWithOptions().
1106  std::string DebugStringWithOptions(const DebugStringOptions& options) const;
1107 
1108  // Returns true if this is a placeholder for an unknown enum. This will
1109  // only be the case if this descriptor comes from a DescriptorPool
1110  // with AllowUnknownDependencies() set.
1111  bool is_placeholder() const;
1112 
1113  // Reserved fields -------------------------------------------------
1114 
1115  // A range of reserved field numbers.
1116  struct ReservedRange {
1117  int start; // inclusive
1118  int end; // inclusive
1119  };
1120 
1121  // The number of reserved ranges in this message type.
1122  int reserved_range_count() const;
1123  // Gets an reserved range by index, where 0 <= index <
1124  // reserved_range_count(). These are returned in the order they were defined
1125  // in the .proto file.
1126  const EnumDescriptor::ReservedRange* reserved_range(int index) const;
1127 
1128  // Returns true if the number is in one of the reserved ranges.
1129  bool IsReservedNumber(int number) const;
1130 
1131  // Returns nullptr if no reserved range contains the given number.
1132  const EnumDescriptor::ReservedRange* FindReservedRangeContainingNumber(
1133  int number) const;
1134 
1135  // The number of reserved field names in this message type.
1136  int reserved_name_count() const;
1137 
1138  // Gets a reserved name by index, where 0 <= index < reserved_name_count().
1139  const std::string& reserved_name(int index) const;
1140 
1141  // Returns true if the field name is reserved.
1142  bool IsReservedName(ConstStringParam name) const;
1143 
1144  // Source Location ---------------------------------------------------
1145 
1146  // Updates |*out_location| to the source location of the complete
1147  // extent of this enum declaration. Returns false and leaves
1148  // |*out_location| unchanged iff location information was not available.
1149  bool GetSourceLocation(SourceLocation* out_location) const;
1150 
1151  private:
1152  friend class Symbol;
1154 
1155  // Allows access to GetLocationPath for annotations.
1156  friend class io::Printer;
1157  friend class compiler::cpp::Formatter;
1158 
1159  // Allow access to FindValueByNumberCreatingIfUnknown.
1161 
1162  // Looks up a value by number. If the value does not exist, dynamically
1163  // creates a new EnumValueDescriptor for that value, assuming that it was
1164  // unknown. If a new descriptor is created, this is done in a thread-safe way,
1165  // and future calls will return the same value descriptor pointer.
1166  //
1167  // This is private but is used by Reflection (which is friended below) to
1168  // return a valid EnumValueDescriptor from GetEnum() when this feature is
1169  // enabled.
1170  const EnumValueDescriptor* FindValueByNumberCreatingIfUnknown(
1171  int number) const;
1172 
1173  // See Descriptor::DebugString().
1175  const DebugStringOptions& options) const;
1176 
1177  // Walks up the descriptor tree to generate the source location path
1178  // to this descriptor from the file root.
1179  void GetLocationPath(std::vector<int>* output) const;
1180 
1181  // True if this is a placeholder for an unknown type.
1182  bool is_placeholder_ : 1;
1183  // True if this is a placeholder and the type name wasn't fully-qualified.
1184  bool is_unqualified_placeholder_ : 1;
1185 
1186  // This points to the last value _index_ that is part of the sequence starting
1187  // with the first label, where
1188  // `enum->value(i)->number() == enum->value(0)->number() + i`
1189  // We measure relative to the first label to adapt to enum labels starting at
1190  // 0 or 1.
1191  // Uses 16-bit to avoid extra padding. Unlikely to have more than 2^15
1192  // sequentially numbered labels in an enum.
1194 
1195  int value_count_;
1196 
1197  // all_names_ = [name, full_name]
1199  const FileDescriptor* file_;
1200  const Descriptor* containing_type_;
1201  const EnumOptions* options_;
1202  EnumValueDescriptor* values_;
1203 
1204  int reserved_range_count_;
1205  int reserved_name_count_;
1206  EnumDescriptor::ReservedRange* reserved_ranges_;
1207  const std::string** reserved_names_;
1208 
1209  // IMPORTANT: If you add a new field, make sure to search for all instances
1210  // of Allocate<EnumDescriptor>() and AllocateArray<EnumDescriptor>() in
1211  // descriptor.cc and update them to initialize the field.
1212 
1213  // Must be constructed using DescriptorPool.
1215  friend class DescriptorBuilder;
1216  friend class Descriptor;
1217  friend class FieldDescriptor;
1218  friend class FileDescriptorTables;
1219  friend class EnumValueDescriptor;
1220  friend class FileDescriptor;
1221  friend class DescriptorPool;
1222  friend class Reflection;
1224 };
1225 
1226 // Describes an individual enum constant of a particular type. To get the
1227 // EnumValueDescriptor for a given enum value, first get the EnumDescriptor
1228 // for its type, then use EnumDescriptor::FindValueByName() or
1229 // EnumDescriptor::FindValueByNumber(). Use DescriptorPool to construct
1230 // your own descriptors.
1231 class PROTOBUF_EXPORT EnumValueDescriptor : private internal::SymbolBaseN<0>,
1232  private internal::SymbolBaseN<1> {
1233  public:
1235 
1236  const std::string& name() const; // Name of this enum constant.
1237  int index() const; // Index within the enums's Descriptor.
1238  int number() const; // Numeric value of this enum constant.
1239 
1240  // The full_name of an enum value is a sibling symbol of the enum type.
1241  // e.g. the full name of FieldDescriptorProto::TYPE_INT32 is actually
1242  // "google.protobuf.FieldDescriptorProto.TYPE_INT32", NOT
1243  // "google.protobuf.FieldDescriptorProto.Type.TYPE_INT32". This is to conform
1244  // with C++ scoping rules for enums.
1245  const std::string& full_name() const;
1246 
1247  // The .proto file in which this value was defined. Never nullptr.
1248  const FileDescriptor* file() const;
1249  // The type of this value. Never nullptr.
1250  const EnumDescriptor* type() const;
1251 
1252  // Get options for this enum value. These are specified in the .proto file by
1253  // adding text like "[foo = 1234]" after an enum value definition. Allowed
1254  // options are defined by EnumValueOptions in descriptor.proto, and any
1255  // available extensions of that message.
1256  const EnumValueOptions& options() const;
1257 
1258  // See Descriptor::CopyTo().
1259  void CopyTo(EnumValueDescriptorProto* proto) const;
1260 
1261  // See Descriptor::DebugString().
1262  std::string DebugString() const;
1263 
1264  // See Descriptor::DebugStringWithOptions().
1265  std::string DebugStringWithOptions(const DebugStringOptions& options) const;
1266 
1267  // Source Location ---------------------------------------------------
1268 
1269  // Updates |*out_location| to the source location of the complete
1270  // extent of this enum value declaration. Returns false and leaves
1271  // |*out_location| unchanged iff location information was not available.
1272  bool GetSourceLocation(SourceLocation* out_location) const;
1273 
1274  private:
1275  friend class Symbol;
1277 
1278  // Allows access to GetLocationPath for annotations.
1279  friend class io::Printer;
1280  friend class compiler::cpp::Formatter;
1281 
1282  // See Descriptor::DebugString().
1284  const DebugStringOptions& options) const;
1285 
1286  // Walks up the descriptor tree to generate the source location path
1287  // to this descriptor from the file root.
1288  void GetLocationPath(std::vector<int>* output) const;
1289 
1290  int number_;
1291  // all_names_ = [name, full_name]
1293  const EnumDescriptor* type_;
1294  const EnumValueOptions* options_;
1295  // IMPORTANT: If you add a new field, make sure to search for all instances
1296  // of Allocate<EnumValueDescriptor>() and AllocateArray<EnumValueDescriptor>()
1297  // in descriptor.cc and update them to initialize the field.
1298 
1299  // Must be constructed using DescriptorPool.
1301  friend class DescriptorBuilder;
1302  friend class EnumDescriptor;
1303  friend class DescriptorPool;
1304  friend class FileDescriptorTables;
1305  friend class Reflection;
1307 };
1308 
1309 // Describes an RPC service. Use DescriptorPool to construct your own
1310 // descriptors.
1311 class PROTOBUF_EXPORT ServiceDescriptor : private internal::SymbolBase {
1312  public:
1314 
1315  // The name of the service, not including its containing scope.
1316  const std::string& name() const;
1317  // The fully-qualified name of the service, scope delimited by periods.
1318  const std::string& full_name() const;
1319  // Index of this service within the file's services array.
1320  int index() const;
1321 
1322  // The .proto file in which this service was defined. Never nullptr.
1323  const FileDescriptor* file() const;
1324 
1325  // Get options for this service type. These are specified in the .proto file
1326  // by placing lines like "option foo = 1234;" in the service definition.
1327  // Allowed options are defined by ServiceOptions in descriptor.proto, and any
1328  // available extensions of that message.
1329  const ServiceOptions& options() const;
1330 
1331  // The number of methods this service defines.
1332  int method_count() const;
1333  // Gets a MethodDescriptor by index, where 0 <= index < method_count().
1334  // These are returned in the order they were defined in the .proto file.
1335  const MethodDescriptor* method(int index) const;
1336 
1337  // Look up a MethodDescriptor by name.
1339  // See Descriptor::CopyTo().
1340  void CopyTo(ServiceDescriptorProto* proto) const;
1341 
1342  // See Descriptor::DebugString().
1343  std::string DebugString() const;
1344 
1345  // See Descriptor::DebugStringWithOptions().
1346  std::string DebugStringWithOptions(const DebugStringOptions& options) const;
1347 
1348  // Source Location ---------------------------------------------------
1349 
1350  // Updates |*out_location| to the source location of the complete
1351  // extent of this service declaration. Returns false and leaves
1352  // |*out_location| unchanged iff location information was not available.
1353  bool GetSourceLocation(SourceLocation* out_location) const;
1354 
1355  private:
1356  friend class Symbol;
1358 
1359  // Allows access to GetLocationPath for annotations.
1360  friend class io::Printer;
1361  friend class compiler::cpp::Formatter;
1362 
1363  // See Descriptor::DebugString().
1365  const DebugStringOptions& options) const;
1366 
1367  // Walks up the descriptor tree to generate the source location path
1368  // to this descriptor from the file root.
1369  void GetLocationPath(std::vector<int>* output) const;
1370 
1371  // all_names_ = [name, full_name]
1373  const FileDescriptor* file_;
1374  const ServiceOptions* options_;
1375  MethodDescriptor* methods_;
1376  int method_count_;
1377  // IMPORTANT: If you add a new field, make sure to search for all instances
1378  // of Allocate<ServiceDescriptor>() and AllocateArray<ServiceDescriptor>() in
1379  // descriptor.cc and update them to initialize the field.
1380 
1381  // Must be constructed using DescriptorPool.
1383  friend class DescriptorBuilder;
1384  friend class FileDescriptor;
1385  friend class MethodDescriptor;
1387 };
1388 
1389 
1390 // Describes an individual service method. To obtain a MethodDescriptor given
1391 // a service, first get its ServiceDescriptor, then call
1392 // ServiceDescriptor::FindMethodByName(). Use DescriptorPool to construct your
1393 // own descriptors.
1394 class PROTOBUF_EXPORT MethodDescriptor : private internal::SymbolBase {
1395  public:
1397 
1398  // Name of this method, not including containing scope.
1399  const std::string& name() const;
1400  // The fully-qualified name of the method, scope delimited by periods.
1401  const std::string& full_name() const;
1402  // Index within the service's Descriptor.
1403  int index() const;
1404 
1405  // The .proto file in which this method was defined. Never nullptr.
1406  const FileDescriptor* file() const;
1407  // Gets the service to which this method belongs. Never nullptr.
1408  const ServiceDescriptor* service() const;
1409 
1410  // Gets the type of protocol message which this method accepts as input.
1411  const Descriptor* input_type() const;
1412  // Gets the type of protocol message which this message produces as output.
1413  const Descriptor* output_type() const;
1414 
1415  // Gets whether the client streams multiple requests.
1416  bool client_streaming() const;
1417  // Gets whether the server streams multiple responses.
1418  bool server_streaming() const;
1419 
1420  // Get options for this method. These are specified in the .proto file by
1421  // placing lines like "option foo = 1234;" in curly-braces after a method
1422  // declaration. Allowed options are defined by MethodOptions in
1423  // descriptor.proto, and any available extensions of that message.
1424  const MethodOptions& options() const;
1425 
1426  // See Descriptor::CopyTo().
1427  void CopyTo(MethodDescriptorProto* proto) const;
1428 
1429  // See Descriptor::DebugString().
1430  std::string DebugString() const;
1431 
1432  // See Descriptor::DebugStringWithOptions().
1433  std::string DebugStringWithOptions(const DebugStringOptions& options) const;
1434 
1435  // Source Location ---------------------------------------------------
1436 
1437  // Updates |*out_location| to the source location of the complete
1438  // extent of this method declaration. Returns false and leaves
1439  // |*out_location| unchanged iff location information was not available.
1440  bool GetSourceLocation(SourceLocation* out_location) const;
1441 
1442  private:
1443  friend class Symbol;
1445 
1446  // Allows access to GetLocationPath for annotations.
1447  friend class io::Printer;
1448  friend class compiler::cpp::Formatter;
1449 
1450  // See Descriptor::DebugString().
1452  const DebugStringOptions& options) const;
1453 
1454  // Walks up the descriptor tree to generate the source location path
1455  // to this descriptor from the file root.
1456  void GetLocationPath(std::vector<int>* output) const;
1457 
1458  bool client_streaming_;
1459  bool server_streaming_;
1460  // all_names_ = [name, full_name]
1462  const ServiceDescriptor* service_;
1463  mutable internal::LazyDescriptor input_type_;
1464  mutable internal::LazyDescriptor output_type_;
1465  const MethodOptions* options_;
1466  // IMPORTANT: If you add a new field, make sure to search for all instances
1467  // of Allocate<MethodDescriptor>() and AllocateArray<MethodDescriptor>() in
1468  // descriptor.cc and update them to initialize the field.
1469 
1470  // Must be constructed using DescriptorPool.
1472  friend class DescriptorBuilder;
1473  friend class ServiceDescriptor;
1475 };
1476 
1477 
1478 // Describes a whole .proto file. To get the FileDescriptor for a compiled-in
1479 // file, get the descriptor for something defined in that file and call
1480 // descriptor->file(). Use DescriptorPool to construct your own descriptors.
1481 class PROTOBUF_EXPORT FileDescriptor {
1482  public:
1484 
1485  // The filename, relative to the source tree.
1486  // e.g. "foo/bar/baz.proto"
1487  const std::string& name() const;
1488 
1489  // The package, e.g. "google.protobuf.compiler".
1490  const std::string& package() const;
1491 
1492  // The DescriptorPool in which this FileDescriptor and all its contents were
1493  // allocated. Never nullptr.
1494  const DescriptorPool* pool() const;
1495 
1496  // The number of files imported by this one.
1497  int dependency_count() const;
1498  // Gets an imported file by index, where 0 <= index < dependency_count().
1499  // These are returned in the order they were defined in the .proto file.
1500  const FileDescriptor* dependency(int index) const;
1501 
1502  // The number of files public imported by this one.
1503  // The public dependency list is a subset of the dependency list.
1504  int public_dependency_count() const;
1505  // Gets a public imported file by index, where 0 <= index <
1506  // public_dependency_count().
1507  // These are returned in the order they were defined in the .proto file.
1508  const FileDescriptor* public_dependency(int index) const;
1509 
1510  // The number of files that are imported for weak fields.
1511  // The weak dependency list is a subset of the dependency list.
1512  int weak_dependency_count() const;
1513  // Gets a weak imported file by index, where 0 <= index <
1514  // weak_dependency_count().
1515  // These are returned in the order they were defined in the .proto file.
1516  const FileDescriptor* weak_dependency(int index) const;
1517 
1518  // Number of top-level message types defined in this file. (This does not
1519  // include nested types.)
1520  int message_type_count() const;
1521  // Gets a top-level message type, where 0 <= index < message_type_count().
1522  // These are returned in the order they were defined in the .proto file.
1523  const Descriptor* message_type(int index) const;
1524 
1525  // Number of top-level enum types defined in this file. (This does not
1526  // include nested types.)
1527  int enum_type_count() const;
1528  // Gets a top-level enum type, where 0 <= index < enum_type_count().
1529  // These are returned in the order they were defined in the .proto file.
1530  const EnumDescriptor* enum_type(int index) const;
1531 
1532  // Number of services defined in this file.
1533  int service_count() const;
1534  // Gets a service, where 0 <= index < service_count().
1535  // These are returned in the order they were defined in the .proto file.
1536  const ServiceDescriptor* service(int index) const;
1537 
1538  // Number of extensions defined at file scope. (This does not include
1539  // extensions nested within message types.)
1540  int extension_count() const;
1541  // Gets an extension's descriptor, where 0 <= index < extension_count().
1542  // These are returned in the order they were defined in the .proto file.
1543  const FieldDescriptor* extension(int index) const;
1544 
1545  // Get options for this file. These are specified in the .proto file by
1546  // placing lines like "option foo = 1234;" at the top level, outside of any
1547  // other definitions. Allowed options are defined by FileOptions in
1548  // descriptor.proto, and any available extensions of that message.
1549  const FileOptions& options() const;
1550 
1551  // Syntax of this file.
1552  enum Syntax {
1553  SYNTAX_UNKNOWN = 0,
1554  SYNTAX_PROTO2 = 2,
1555  SYNTAX_PROTO3 = 3,
1556  };
1557  Syntax syntax() const;
1558  static const char* SyntaxName(Syntax syntax);
1559 
1560  // Find a top-level message type by name (not full_name). Returns nullptr if
1561  // not found.
1562  const Descriptor* FindMessageTypeByName(ConstStringParam name) const;
1563  // Find a top-level enum type by name. Returns nullptr if not found.
1565  // Find an enum value defined in any top-level enum by name. Returns nullptr
1566  // if not found.
1567  const EnumValueDescriptor* FindEnumValueByName(ConstStringParam name) const;
1568  // Find a service definition by name. Returns nullptr if not found.
1570  // Find a top-level extension definition by name. Returns nullptr if not
1571  // found.
1573  // Similar to FindExtensionByName(), but searches by lowercased-name. See
1574  // Descriptor::FindFieldByLowercaseName().
1575  const FieldDescriptor* FindExtensionByLowercaseName(
1576  ConstStringParam name) const;
1577  // Similar to FindExtensionByName(), but searches by camelcased-name. See
1578  // Descriptor::FindFieldByCamelcaseName().
1579  const FieldDescriptor* FindExtensionByCamelcaseName(
1580  ConstStringParam name) const;
1581 
1582  // See Descriptor::CopyTo().
1583  // Notes:
1584  // - This method does NOT copy source code information since it is relatively
1585  // large and rarely needed. See CopySourceCodeInfoTo() below.
1586  void CopyTo(FileDescriptorProto* proto) const;
1587  // Write the source code information of this FileDescriptor into the given
1588  // FileDescriptorProto. See CopyTo() above.
1589  void CopySourceCodeInfoTo(FileDescriptorProto* proto) const;
1590  // Fill the json_name field of FieldDescriptorProto for all fields. Can only
1591  // be called after CopyTo().
1592  void CopyJsonNameTo(FileDescriptorProto* proto) const;
1593 
1594  // See Descriptor::DebugString().
1595  std::string DebugString() const;
1596 
1597  // See Descriptor::DebugStringWithOptions().
1598  std::string DebugStringWithOptions(const DebugStringOptions& options) const;
1599 
1600  // Returns true if this is a placeholder for an unknown file. This will
1601  // only be the case if this descriptor comes from a DescriptorPool
1602  // with AllowUnknownDependencies() set.
1603  bool is_placeholder() const;
1604 
1605  // Updates |*out_location| to the source location of the complete extent of
1606  // this file declaration (namely, the empty path).
1607  bool GetSourceLocation(SourceLocation* out_location) const;
1608 
1609  // Updates |*out_location| to the source location of the complete
1610  // extent of the declaration or declaration-part denoted by |path|.
1611  // Returns false and leaves |*out_location| unchanged iff location
1612  // information was not available. (See SourceCodeInfo for
1613  // description of path encoding.)
1614  bool GetSourceLocation(const std::vector<int>& path,
1615  SourceLocation* out_location) const;
1616 
1617  private:
1619 
1620  const std::string* name_;
1621  const std::string* package_;
1622  const DescriptorPool* pool_;
1623 
1624  // Data required to do lazy initialization.
1625  struct PROTOBUF_EXPORT LazyInitData {
1626 #ifndef SWIG
1628 #endif
1629  const char** dependencies_names;
1630  };
1631 
1633  static void DependenciesOnceInit(const FileDescriptor* to_init);
1634  void InternalDependenciesOnceInit() const;
1635 
1636  // These are arranged to minimize padding on 64-bit.
1637  int dependency_count_;
1638  int public_dependency_count_;
1639  int weak_dependency_count_;
1640  int message_type_count_;
1641  int enum_type_count_;
1642  int service_count_;
1643 
1644  bool is_placeholder_;
1645  // Indicates the FileDescriptor is completed building. Used to verify
1646  // that type accessor functions that can possibly build a dependent file
1647  // aren't called during the process of building the file.
1648  bool finished_building_;
1649  // Actually a `Syntax` but stored as uint8_t to save space.
1651  // This one is here to fill the padding.
1652  int extension_count_;
1653 
1654  mutable const FileDescriptor** dependencies_;
1655  int* public_dependencies_;
1656  int* weak_dependencies_;
1657  Descriptor* message_types_;
1658  EnumDescriptor* enum_types_;
1659  ServiceDescriptor* services_;
1660  FieldDescriptor* extensions_;
1661  const FileOptions* options_;
1662 
1663  const FileDescriptorTables* tables_;
1664  const SourceCodeInfo* source_code_info_;
1665 
1666  // IMPORTANT: If you add a new field, make sure to search for all instances
1667  // of Allocate<FileDescriptor>() and AllocateArray<FileDescriptor>() in
1668  // descriptor.cc and update them to initialize the field.
1669 
1671  friend class DescriptorBuilder;
1672  friend class DescriptorPool;
1673  friend class Descriptor;
1674  friend class FieldDescriptor;
1675  friend class internal::LazyDescriptor;
1676  friend class OneofDescriptor;
1677  friend class EnumDescriptor;
1678  friend class EnumValueDescriptor;
1679  friend class MethodDescriptor;
1680  friend class ServiceDescriptor;
1682 };
1683 
1684 
1685 // ===================================================================
1686 
1687 // Used to construct descriptors.
1688 //
1689 // Normally you won't want to build your own descriptors. Message classes
1690 // constructed by the protocol compiler will provide them for you. However,
1691 // if you are implementing Message on your own, or if you are writing a
1692 // program which can operate on totally arbitrary types and needs to load
1693 // them from some sort of database, you might need to.
1694 //
1695 // Since Descriptors are composed of a whole lot of cross-linked bits of
1696 // data that would be a pain to put together manually, the
1697 // DescriptorPool class is provided to make the process easier. It can
1698 // take a FileDescriptorProto (defined in descriptor.proto), validate it,
1699 // and convert it to a set of nicely cross-linked Descriptors.
1700 //
1701 // DescriptorPool also helps with memory management. Descriptors are
1702 // composed of many objects containing static data and pointers to each
1703 // other. In all likelihood, when it comes time to delete this data,
1704 // you'll want to delete it all at once. In fact, it is not uncommon to
1705 // have a whole pool of descriptors all cross-linked with each other which
1706 // you wish to delete all at once. This class represents such a pool, and
1707 // handles the memory management for you.
1708 //
1709 // You can also search for descriptors within a DescriptorPool by name, and
1710 // extensions by number.
1711 class PROTOBUF_EXPORT DescriptorPool {
1712  public:
1713  // Create a normal, empty DescriptorPool.
1714  DescriptorPool();
1715 
1716  // Constructs a DescriptorPool that, when it can't find something among the
1717  // descriptors already in the pool, looks for it in the given
1718  // DescriptorDatabase.
1719  // Notes:
1720  // - If a DescriptorPool is constructed this way, its BuildFile*() methods
1721  // must not be called (they will assert-fail). The only way to populate
1722  // the pool with descriptors is to call the Find*By*() methods.
1723  // - The Find*By*() methods may block the calling thread if the
1724  // DescriptorDatabase blocks. This in turn means that parsing messages
1725  // may block if they need to look up extensions.
1726  // - The Find*By*() methods will use mutexes for thread-safety, thus making
1727  // them slower even when they don't have to fall back to the database.
1728  // In fact, even the Find*By*() methods of descriptor objects owned by
1729  // this pool will be slower, since they will have to obtain locks too.
1730  // - An ErrorCollector may optionally be given to collect validation errors
1731  // in files loaded from the database. If not given, errors will be printed
1732  // to GOOGLE_LOG(ERROR). Remember that files are built on-demand, so this
1733  // ErrorCollector may be called from any thread that calls one of the
1734  // Find*By*() methods.
1735  // - The DescriptorDatabase must not be mutated during the lifetime of
1736  // the DescriptorPool. Even if the client takes care to avoid data races,
1737  // changes to the content of the DescriptorDatabase may not be reflected
1738  // in subsequent lookups in the DescriptorPool.
1739  class ErrorCollector;
1740  explicit DescriptorPool(DescriptorDatabase* fallback_database,
1741  ErrorCollector* error_collector = nullptr);
1742 
1743  ~DescriptorPool();
1744 
1745  // Get a pointer to the generated pool. Generated protocol message classes
1746  // which are compiled into the binary will allocate their descriptors in
1747  // this pool. Do not add your own descriptors to this pool.
1748  static const DescriptorPool* generated_pool();
1749 
1750 
1751  // Find a FileDescriptor in the pool by file name. Returns nullptr if not
1752  // found.
1754 
1755  // Find the FileDescriptor in the pool which defines the given symbol.
1756  // If any of the Find*ByName() methods below would succeed, then this is
1757  // equivalent to calling that method and calling the result's file() method.
1758  // Otherwise this returns nullptr.
1760  ConstStringParam symbol_name) const;
1761 
1762  // Looking up descriptors ------------------------------------------
1763  // These find descriptors by fully-qualified name. These will find both
1764  // top-level descriptors and nested descriptors. They return nullptr if not
1765  // found.
1766 
1767  const Descriptor* FindMessageTypeByName(ConstStringParam name) const;
1772  const EnumValueDescriptor* FindEnumValueByName(ConstStringParam name) const;
1775 
1776  // Finds an extension of the given type by number. The extendee must be
1777  // a member of this DescriptorPool or one of its underlays.
1778  const FieldDescriptor* FindExtensionByNumber(const Descriptor* extendee,
1779  int number) const;
1780 
1781  // Finds an extension of the given type by its printable name.
1782  // See comments above PrintableNameForExtension() for the definition of
1783  // "printable name". The extendee must be a member of this DescriptorPool
1784  // or one of its underlays. Returns nullptr if there is no known message
1785  // extension with the given printable name.
1786  const FieldDescriptor* FindExtensionByPrintableName(
1787  const Descriptor* extendee, ConstStringParam printable_name) const;
1788 
1789  // Finds extensions of extendee. The extensions will be appended to
1790  // out in an undefined order. Only extensions defined directly in
1791  // this DescriptorPool or one of its underlays are guaranteed to be
1792  // found: extensions defined in the fallback database might not be found
1793  // depending on the database implementation.
1794  void FindAllExtensions(const Descriptor* extendee,
1795  std::vector<const FieldDescriptor*>* out) const;
1796 
1797  // Building descriptors --------------------------------------------
1798 
1799  // When converting a FileDescriptorProto to a FileDescriptor, various
1800  // errors might be detected in the input. The caller may handle these
1801  // programmatically by implementing an ErrorCollector.
1802  class PROTOBUF_EXPORT ErrorCollector {
1803  public:
1804  inline ErrorCollector() {}
1805  virtual ~ErrorCollector();
1806 
1807  // These constants specify what exact part of the construct is broken.
1808  // This is useful e.g. for mapping the error back to an exact location
1809  // in a .proto file.
1811  NAME, // the symbol name, or the package name for files
1812  NUMBER, // field or extension range number
1813  TYPE, // field type
1814  EXTENDEE, // field extendee
1815  DEFAULT_VALUE, // field default value
1816  INPUT_TYPE, // method input type
1817  OUTPUT_TYPE, // method output type
1818  OPTION_NAME, // name in assignment
1819  OPTION_VALUE, // value in option assignment
1820  IMPORT, // import error
1821  OTHER // some other problem
1822  };
1823 
1824  // Reports an error in the FileDescriptorProto. Use this function if the
1825  // problem occurred should interrupt building the FileDescriptorProto.
1826  virtual void AddError(
1827  const std::string& filename, // File name in which the error occurred.
1828  const std::string& element_name, // Full name of the erroneous element.
1829  const Message* descriptor, // Descriptor of the erroneous element.
1830  ErrorLocation location, // One of the location constants, above.
1831  const std::string& message // Human-readable error message.
1832  ) = 0;
1833 
1834  // Reports a warning in the FileDescriptorProto. Use this function if the
1835  // problem occurred should NOT interrupt building the FileDescriptorProto.
1836  virtual void AddWarning(
1837  const std::string& /*filename*/, // File name in which the error
1838  // occurred.
1839  const std::string& /*element_name*/, // Full name of the erroneous
1840  // element.
1841  const Message* /*descriptor*/, // Descriptor of the erroneous element.
1842  ErrorLocation /*location*/, // One of the location constants, above.
1843  const std::string& /*message*/ // Human-readable error message.
1844  ) {}
1845 
1846  private:
1848  };
1849 
1850  // Convert the FileDescriptorProto to real descriptors and place them in
1851  // this DescriptorPool. All dependencies of the file must already be in
1852  // the pool. Returns the resulting FileDescriptor, or nullptr if there were
1853  // problems with the input (e.g. the message was invalid, or dependencies
1854  // were missing). Details about the errors are written to GOOGLE_LOG(ERROR).
1855  const FileDescriptor* BuildFile(const FileDescriptorProto& proto);
1856 
1857  // Same as BuildFile() except errors are sent to the given ErrorCollector.
1858  const FileDescriptor* BuildFileCollectingErrors(
1859  const FileDescriptorProto& proto, ErrorCollector* error_collector);
1860 
1861  // By default, it is an error if a FileDescriptorProto contains references
1862  // to types or other files that are not found in the DescriptorPool (or its
1863  // backing DescriptorDatabase, if any). If you call
1864  // AllowUnknownDependencies(), however, then unknown types and files
1865  // will be replaced by placeholder descriptors (which can be identified by
1866  // the is_placeholder() method). This can allow you to
1867  // perform some useful operations with a .proto file even if you do not
1868  // have access to other .proto files on which it depends. However, some
1869  // heuristics must be used to fill in the gaps in information, and these
1870  // can lead to descriptors which are inaccurate. For example, the
1871  // DescriptorPool may be forced to guess whether an unknown type is a message
1872  // or an enum, as well as what package it resides in. Furthermore,
1873  // placeholder types will not be discoverable via FindMessageTypeByName()
1874  // and similar methods, which could confuse some descriptor-based algorithms.
1875  // Generally, the results of this option should be handled with extreme care.
1876  void AllowUnknownDependencies() { allow_unknown_ = true; }
1877 
1878  // By default, weak imports are allowed to be missing, in which case we will
1879  // use a placeholder for the dependency and convert the field to be an Empty
1880  // message field. If you call EnforceWeakDependencies(true), however, the
1881  // DescriptorPool will report a import not found error.
1882  void EnforceWeakDependencies(bool enforce) { enforce_weak_ = enforce; }
1883 
1884  // Internal stuff --------------------------------------------------
1885  // These methods MUST NOT be called from outside the proto2 library.
1886  // These methods may contain hidden pitfalls and may be removed in a
1887  // future library version.
1888 
1889  // Create a DescriptorPool which is overlaid on top of some other pool.
1890  // If you search for a descriptor in the overlay and it is not found, the
1891  // underlay will be searched as a backup. If the underlay has its own
1892  // underlay, that will be searched next, and so on. This also means that
1893  // files built in the overlay will be cross-linked with the underlay's
1894  // descriptors if necessary. The underlay remains property of the caller;
1895  // it must remain valid for the lifetime of the newly-constructed pool.
1896  //
1897  // Example: Say you want to parse a .proto file at runtime in order to use
1898  // its type with a DynamicMessage. Say this .proto file has dependencies,
1899  // but you know that all the dependencies will be things that are already
1900  // compiled into the binary. For ease of use, you'd like to load the types
1901  // right out of generated_pool() rather than have to parse redundant copies
1902  // of all these .protos and runtime. But, you don't want to add the parsed
1903  // types directly into generated_pool(): this is not allowed, and would be
1904  // bad design anyway. So, instead, you could use generated_pool() as an
1905  // underlay for a new DescriptorPool in which you add only the new file.
1906  //
1907  // WARNING: Use of underlays can lead to many subtle gotchas. Instead,
1908  // try to formulate what you want to do in terms of DescriptorDatabases.
1909  explicit DescriptorPool(const DescriptorPool* underlay);
1910 
1911  // Called by generated classes at init time to add their descriptors to
1912  // generated_pool. Do NOT call this in your own code! filename must be a
1913  // permanent string (e.g. a string literal).
1914  static void InternalAddGeneratedFile(const void* encoded_file_descriptor,
1915  int size);
1916 
1917  // Disallow [enforce_utf8 = false] in .proto files.
1918  void DisallowEnforceUtf8() { disallow_enforce_utf8_ = true; }
1919 
1920 
1921  // For internal use only: Gets a non-const pointer to the generated pool.
1922  // This is called at static-initialization time only, so thread-safety is
1923  // not a concern. If both an underlay and a fallback database are present,
1924  // the underlay takes precedence.
1925  static DescriptorPool* internal_generated_pool();
1926 
1927  // For internal use only: Gets a non-const pointer to the generated
1928  // descriptor database.
1929  // Only used for testing.
1930  static DescriptorDatabase* internal_generated_database();
1931 
1932  // For internal use only: Changes the behavior of BuildFile() such that it
1933  // allows the file to make reference to message types declared in other files
1934  // which it did not officially declare as dependencies.
1935  void InternalDontEnforceDependencies();
1936 
1937  // For internal use only: Enables lazy building of dependencies of a file.
1938  // Delay the building of dependencies of a file descriptor until absolutely
1939  // necessary, like when message_type() is called on a field that is defined
1940  // in that dependency's file. This will cause functional issues if a proto
1941  // or one of its dependencies has errors. Should only be enabled for the
1942  // generated_pool_ (because no descriptor build errors are guaranteed by
1943  // the compilation generation process), testing, or if a lack of descriptor
1944  // build errors can be guaranteed for a pool.
1946  lazily_build_dependencies_ = true;
1947  // This needs to be set when lazily building dependencies, as it breaks
1948  // dependency checking.
1949  InternalDontEnforceDependencies();
1950  }
1951 
1952  // For internal use only.
1953  void internal_set_underlay(const DescriptorPool* underlay) {
1954  underlay_ = underlay;
1955  }
1956 
1957  // For internal (unit test) use only: Returns true if a FileDescriptor has
1958  // been constructed for the given file, false otherwise. Useful for testing
1959  // lazy descriptor initialization behavior.
1960  bool InternalIsFileLoaded(ConstStringParam filename) const;
1961 
1962  // Add a file to unused_import_track_files_. DescriptorBuilder will log
1963  // warnings or errors for those files if there is any unused import.
1964  void AddUnusedImportTrackFile(ConstStringParam file_name,
1965  bool is_error = false);
1966  void ClearUnusedImportTrackFiles();
1967 
1968  private:
1969  friend class Descriptor;
1970  friend class internal::LazyDescriptor;
1971  friend class FieldDescriptor;
1972  friend class EnumDescriptor;
1973  friend class ServiceDescriptor;
1974  friend class MethodDescriptor;
1975  friend class FileDescriptor;
1976  friend class StreamDescriptor;
1977  friend class DescriptorBuilder;
1978  friend class FileDescriptorTables;
1979 
1980  // Return true if the given name is a sub-symbol of any non-package
1981  // descriptor that already exists in the descriptor pool. (The full
1982  // definition of such types is already known.)
1983  bool IsSubSymbolOfBuiltType(StringPiece name) const;
1984 
1985  // Tries to find something in the fallback database and link in the
1986  // corresponding proto file. Returns true if successful, in which case
1987  // the caller should search for the thing again. These are declared
1988  // const because they are called by (semantically) const methods.
1989  bool TryFindFileInFallbackDatabase(StringPiece name) const;
1990  bool TryFindSymbolInFallbackDatabase(StringPiece name) const;
1991  bool TryFindExtensionInFallbackDatabase(const Descriptor* containing_type,
1992  int field_number) const;
1993 
1994  // This internal find extension method only check with its table and underlay
1995  // descriptor_pool's table. It does not check with fallback DB and no
1996  // additional proto file will be build in this method.
1997  const FieldDescriptor* InternalFindExtensionByNumberNoLock(
1998  const Descriptor* extendee, int number) const;
1999 
2000  // Like BuildFile() but called internally when the file has been loaded from
2001  // fallback_database_. Declared const because it is called by (semantically)
2002  // const methods.
2003  const FileDescriptor* BuildFileFromDatabase(
2004  const FileDescriptorProto& proto) const;
2005 
2006  // Helper for when lazily_build_dependencies_ is set, can look up a symbol
2007  // after the file's descriptor is built, and can build the file where that
2008  // symbol is defined if necessary. Will create a placeholder if the type
2009  // doesn't exist in the fallback database, or the file doesn't build
2010  // successfully.
2011  Symbol CrossLinkOnDemandHelper(StringPiece name,
2012  bool expecting_enum) const;
2013 
2014  // Create a placeholder FileDescriptor of the specified name
2015  FileDescriptor* NewPlaceholderFile(StringPiece name) const;
2016  FileDescriptor* NewPlaceholderFileWithMutexHeld(StringPiece name) const;
2017 
2019  PLACEHOLDER_MESSAGE,
2020  PLACEHOLDER_ENUM,
2021  PLACEHOLDER_EXTENDABLE_MESSAGE
2022  };
2023  // Create a placeholder Descriptor of the specified name
2024  Symbol NewPlaceholder(StringPiece name,
2025  PlaceholderType placeholder_type) const;
2026  Symbol NewPlaceholderWithMutexHeld(StringPiece name,
2027  PlaceholderType placeholder_type) const;
2028 
2029  // If fallback_database_ is nullptr, this is nullptr. Otherwise, this is a
2030  // mutex which must be locked while accessing tables_.
2031  internal::WrappedMutex* mutex_;
2032 
2033  // See constructor.
2034  DescriptorDatabase* fallback_database_;
2035  ErrorCollector* default_error_collector_;
2036  const DescriptorPool* underlay_;
2037 
2038  // This class contains a lot of hash maps with complicated types that
2039  // we'd like to keep out of the header.
2040  class Tables;
2041  std::unique_ptr<Tables> tables_;
2042 
2043  bool enforce_dependencies_;
2044  bool lazily_build_dependencies_;
2045  bool allow_unknown_;
2046  bool enforce_weak_;
2047  bool disallow_enforce_utf8_;
2048 
2049  // Set of files to track for unused imports. The bool value when true means
2050  // unused imports are treated as errors (and as warnings when false).
2051  std::map<std::string, bool> unused_import_track_files_;
2052 
2054 };
2055 
2056 
2057 // inline methods ====================================================
2058 
2059 // These macros makes this repetitive code more readable.
2060 #define PROTOBUF_DEFINE_ACCESSOR(CLASS, FIELD, TYPE) \
2061  inline TYPE CLASS::FIELD() const { return FIELD##_; }
2062 
2063 // Strings fields are stored as pointers but returned as const references.
2064 #define PROTOBUF_DEFINE_STRING_ACCESSOR(CLASS, FIELD) \
2065  inline const std::string& CLASS::FIELD() const { return *FIELD##_; }
2066 
2067 // Name and full name are stored in a single array to save space.
2068 #define PROTOBUF_DEFINE_NAME_ACCESSOR(CLASS) \
2069  inline const std::string& CLASS::name() const { return all_names_[0]; } \
2070  inline const std::string& CLASS::full_name() const { return all_names_[1]; }
2071 
2072 // Arrays take an index parameter, obviously.
2073 #define PROTOBUF_DEFINE_ARRAY_ACCESSOR(CLASS, FIELD, TYPE) \
2074  inline TYPE CLASS::FIELD(int index) const { return FIELD##s_ + index; }
2075 
2076 #define PROTOBUF_DEFINE_OPTIONS_ACCESSOR(CLASS, TYPE) \
2077  inline const TYPE& CLASS::options() const { return *options_; }
2078 
2082 
2083 PROTOBUF_DEFINE_ACCESSOR(Descriptor, field_count, int)
2084 PROTOBUF_DEFINE_ACCESSOR(Descriptor, oneof_decl_count, int)
2085 PROTOBUF_DEFINE_ACCESSOR(Descriptor, real_oneof_decl_count, int)
2086 PROTOBUF_DEFINE_ACCESSOR(Descriptor, nested_type_count, int)
2087 PROTOBUF_DEFINE_ACCESSOR(Descriptor, enum_type_count, int)
2088 
2093 
2094 PROTOBUF_DEFINE_ACCESSOR(Descriptor, extension_range_count, int)
2095 PROTOBUF_DEFINE_ACCESSOR(Descriptor, extension_count, int)
2097  const Descriptor::ExtensionRange*)
2099 
2100 PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_range_count, int)
2102  const Descriptor::ReservedRange*)
2103 PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_name_count, int)
2104 
2106 PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool)
2107 
2111 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, is_extension, bool)
2114 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_default_value, bool)
2115 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, has_json_name, bool)
2116 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int32_t, int32_t)
2117 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_int64_t, int64_t)
2118 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_uint32_t, uint32_t)
2119 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_uint64_t, uint64_t)
2120 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_float, float)
2121 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_double, double)
2122 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, default_value_bool, bool)
2123 PROTOBUF_DEFINE_STRING_ACCESSOR(FieldDescriptor, default_value_string)
2124 
2127 PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, field_count, int)
2130 
2134 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, value_count, int)
2136  const EnumValueDescriptor*)
2138 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, is_placeholder, bool)
2139 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, reserved_range_count, int)
2141  const EnumDescriptor::ReservedRange*)
2142 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, reserved_name_count, int)
2143 
2148 
2151 PROTOBUF_DEFINE_ACCESSOR(ServiceDescriptor, method_count, int)
2153  const MethodDescriptor*)
2155 
2161 
2165 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, dependency_count, int)
2166 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, public_dependency_count, int)
2167 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, weak_dependency_count, int)
2168 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, message_type_count, int)
2169 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, enum_type_count, int)
2170 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, service_count, int)
2171 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, extension_count, int)
2173 PROTOBUF_DEFINE_ACCESSOR(FileDescriptor, is_placeholder, bool)
2174 
2181 
2182 #undef PROTOBUF_DEFINE_ACCESSOR
2183 #undef PROTOBUF_DEFINE_STRING_ACCESSOR
2184 #undef PROTOBUF_DEFINE_ARRAY_ACCESSOR
2185 
2186 // A few accessors differ from the macros...
2187 
2189  return static_cast<Descriptor::WellKnownType>(well_known_type_);
2190 }
2191 
2192 inline bool Descriptor::IsExtensionNumber(int number) const {
2193  return FindExtensionRangeContainingNumber(number) != nullptr;
2194 }
2195 
2196 inline bool Descriptor::IsReservedNumber(int number) const {
2197  return FindReservedRangeContainingNumber(number) != nullptr;
2198 }
2199 
2201  for (int i = 0; i < reserved_name_count(); i++) {
2202  if (name == static_cast<ConstStringParam>(reserved_name(i))) {
2203  return true;
2204  }
2205  }
2206  return false;
2207 }
2208 
2209 // Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because reserved_names_ is actually
2210 // an array of pointers rather than the usual array of objects.
2211 inline const std::string& Descriptor::reserved_name(int index) const {
2212  return *reserved_names_[index];
2213 }
2214 
2215 inline bool EnumDescriptor::IsReservedNumber(int number) const {
2216  return FindReservedRangeContainingNumber(number) != nullptr;
2217 }
2218 
2220  for (int i = 0; i < reserved_name_count(); i++) {
2221  if (name == static_cast<ConstStringParam>(reserved_name(i))) {
2222  return true;
2223  }
2224  }
2225  return false;
2226 }
2227 
2228 // Can't use PROTOBUF_DEFINE_ARRAY_ACCESSOR because reserved_names_ is actually
2229 // an array of pointers rather than the usual array of objects.
2230 inline const std::string& EnumDescriptor::reserved_name(int index) const {
2231  return *reserved_names_[index];
2232 }
2233 
2234 inline const std::string& FieldDescriptor::lowercase_name() const {
2236 }
2237 
2238 inline const std::string& FieldDescriptor::camelcase_name() const {
2240 }
2241 
2242 inline const std::string& FieldDescriptor::json_name() const {
2243  return all_names_[json_name_index_];
2244 }
2245 
2246 inline const OneofDescriptor* FieldDescriptor::containing_oneof() const {
2247  return is_oneof_ ? scope_.containing_oneof : nullptr;
2248 }
2249 
2250 inline int FieldDescriptor::index_in_oneof() const {
2252  return static_cast<int>(this - scope_.containing_oneof->field(0));
2253 }
2254 
2255 inline const Descriptor* FieldDescriptor::extension_scope() const {
2257  return scope_.extension_scope;
2258 }
2259 
2261  return static_cast<Label>(label_);
2262 }
2263 
2265  if (type_once_) {
2267  }
2268  return static_cast<Type>(type_);
2269 }
2270 
2271 inline bool FieldDescriptor::is_required() const {
2272  return label() == LABEL_REQUIRED;
2273 }
2274 
2275 inline bool FieldDescriptor::is_optional() const {
2276  return label() == LABEL_OPTIONAL;
2277 }
2278 
2279 inline bool FieldDescriptor::is_repeated() const {
2280  return label() == LABEL_REPEATED;
2281 }
2282 
2283 inline bool FieldDescriptor::is_packable() const {
2284  return is_repeated() && IsTypePackable(type());
2285 }
2286 
2287 inline bool FieldDescriptor::is_map() const {
2288  return type() == TYPE_MESSAGE && is_map_message_type();
2289 }
2290 
2291 inline bool FieldDescriptor::has_optional_keyword() const {
2292  return proto3_optional_ ||
2294  !containing_oneof());
2295 }
2296 
2298  auto* oneof = containing_oneof();
2299  return oneof && !oneof->is_synthetic() ? oneof : nullptr;
2300 }
2301 
2302 inline bool FieldDescriptor::has_presence() const {
2303  if (is_repeated()) return false;
2304  return cpp_type() == CPPTYPE_MESSAGE || containing_oneof() ||
2306 }
2307 
2308 // To save space, index() is computed by looking at the descriptor's position
2309 // in the parent's array of children.
2310 inline int FieldDescriptor::index() const {
2311  if (!is_extension_) {
2312  return static_cast<int>(this - containing_type()->fields_);
2313  } else if (extension_scope() != nullptr) {
2314  return static_cast<int>(this - extension_scope()->extensions_);
2315  } else {
2316  return static_cast<int>(this - file_->extensions_);
2317  }
2318 }
2319 
2320 inline int Descriptor::index() const {
2321  if (containing_type_ == nullptr) {
2322  return static_cast<int>(this - file_->message_types_);
2323  } else {
2324  return static_cast<int>(this - containing_type_->nested_types_);
2325  }
2326 }
2327 
2328 inline const FileDescriptor* OneofDescriptor::file() const {
2329  return containing_type()->file();
2330 }
2331 
2332 inline int OneofDescriptor::index() const {
2333  return static_cast<int>(this - containing_type_->oneof_decls_);
2334 }
2335 
2336 inline bool OneofDescriptor::is_synthetic() const {
2337  return field_count() == 1 && field(0)->proto3_optional_;
2338 }
2339 
2340 inline int EnumDescriptor::index() const {
2341  if (containing_type_ == nullptr) {
2342  return static_cast<int>(this - file_->enum_types_);
2343  } else {
2344  return static_cast<int>(this - containing_type_->enum_types_);
2345  }
2346 }
2347 
2348 inline const FileDescriptor* EnumValueDescriptor::file() const {
2349  return type()->file();
2350 }
2351 
2352 inline int EnumValueDescriptor::index() const {
2353  return static_cast<int>(this - type_->values_);
2354 }
2355 
2356 inline int ServiceDescriptor::index() const {
2357  return static_cast<int>(this - file_->services_);
2358 }
2359 
2360 inline const FileDescriptor* MethodDescriptor::file() const {
2361  return service()->file();
2362 }
2363 
2364 inline int MethodDescriptor::index() const {
2365  return static_cast<int>(this - service_->methods_);
2366 }
2367 
2368 inline const char* FieldDescriptor::type_name() const {
2369  return kTypeToName[type()];
2370 }
2371 
2373  return kTypeToCppTypeMap[type()];
2374 }
2375 
2376 inline const char* FieldDescriptor::cpp_type_name() const {
2378 }
2379 
2381  return kTypeToCppTypeMap[type];
2382 }
2383 
2384 inline const char* FieldDescriptor::TypeName(Type type) {
2385  return kTypeToName[type];
2386 }
2387 
2388 inline const char* FieldDescriptor::CppTypeName(CppType cpp_type) {
2389  return kCppTypeToName[cpp_type];
2390 }
2391 
2397 }
2398 
2400  int index) const {
2402 }
2403 
2404 inline const FileDescriptor* FileDescriptor::weak_dependency(int index) const {
2406 }
2407 
2409  return static_cast<Syntax>(syntax_);
2410 }
2411 
2412 } // namespace protobuf
2413 } // namespace google
2414 
2415 #include <google/protobuf/port_undef.inc>
2416 
2417 #endif // GOOGLE_PROTOBUF_DESCRIPTOR_H__
google::protobuf::FieldDescriptor::Label
Label
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:571
google::protobuf::Descriptor::WELLKNOWNTYPE_INT32VALUE
@ WELLKNOWNTYPE_INT32VALUE
Definition: protobuf/src/google/protobuf/descriptor.h:304
google::protobuf::OneofDescriptor::OptionsType
OneofOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:1024
google::protobuf::ServiceDescriptor::Proto
ServiceDescriptorProto Proto
Definition: protobuf/src/google/protobuf/descriptor.h:1313
google::protobuf::FileDescriptor::public_dependencies_
int * public_dependencies_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1483
google::protobuf::FileDescriptor::syntax_
uint8_t syntax_
Definition: protobuf/src/google/protobuf/descriptor.h:1650
google::protobuf::FieldDescriptor::Type
Type
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:521
google::protobuf::FieldDescriptor::default_generated_instance_
std::atomic< const Message * > default_generated_instance_
Definition: protobuf/src/google/protobuf/descriptor.h:957
google::protobuf::FieldDescriptor::lazy_type_name
const char * lazy_type_name
Definition: protobuf/src/google/protobuf/descriptor.h:938
google::protobuf::python::cdescriptor_pool::FindEnumTypeByName
PyObject * FindEnumTypeByName(PyDescriptorPool *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:318
google::protobuf.internal::LazyDescriptor::Get
const Descriptor * Get(const ServiceDescriptor *service)
Definition: protobuf/src/google/protobuf/descriptor.h:212
PROTOBUF_DEFINE_NAME_ACCESSOR
#define PROTOBUF_DEFINE_NAME_ACCESSOR(CLASS)
Definition: protobuf/src/google/protobuf/descriptor.h:2068
google::protobuf::MethodDescriptor::index
int index() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2131
google::protobuf.internal::LazyDescriptor::lazy_name_
const char * lazy_name_
Definition: protobuf/src/google/protobuf/descriptor.h:222
PE_SECTION_TYPES::IMPORT
@ IMPORT
descriptor_
string_view descriptor_
Definition: elf.cc:154
filename
const char * filename
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:135
google::protobuf.internal::LazyDescriptor::Init
void Init()
Definition: protobuf/src/google/protobuf/descriptor.h:191
google::protobuf::python::cdescriptor_pool::FindOneofByName
PyObject * FindOneofByName(PyDescriptorPool *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:339
google::protobuf::Descriptor::WELLKNOWNTYPE_UINT32VALUE
@ WELLKNOWNTYPE_UINT32VALUE
Definition: protobuf/src/google/protobuf/descriptor.h:305
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
google::protobuf::EnumValueDescriptor::type
const EnumDescriptor * type() const
google::protobuf::value
const Descriptor::ReservedRange value
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1954
google::protobuf::Descriptor::reserved_name
const std::string & reserved_name(int index) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2029
google::protobuf::FieldDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:515
google::protobuf::FieldDescriptor::type_
Type type_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:790
google::protobuf::FieldDescriptor::default_value_int32
int32_t default_value_int32() const
Definition: protobuf/src/google/protobuf/descriptor.h:756
google::protobuf::DescriptorPool::PlaceholderType
PlaceholderType
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1835
google::protobuf::Descriptor::IsExtensionNumber
bool IsExtensionNumber(int number) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2010
google::protobuf::Descriptor::WELLKNOWNTYPE_STRUCT
@ WELLKNOWNTYPE_STRUCT
Definition: protobuf/src/google/protobuf/descriptor.h:317
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/macros.h:40
const
#define const
Definition: bloaty/third_party/zlib/zconf.h:230
google::protobuf::MethodDescriptor::all_names_
const std::string * all_names_
Definition: protobuf/src/google/protobuf/descriptor.h:1461
google::protobuf::OneofDescriptor::is_synthetic
bool is_synthetic() const
google::protobuf::FieldDescriptor::default_value_uint32_t_
uint32_t default_value_uint32_t_
Definition: protobuf/src/google/protobuf/descriptor.h:948
google::protobuf::EnumDescriptor::file_
const FileDescriptor * file_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1037
google::protobuf::extension
const Descriptor::ReservedRange const EnumValueDescriptor const MethodDescriptor extension
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2001
file
const grpc_generator::File * file
Definition: python_private_generator.h:38
google::protobuf::FieldDescriptor::index_in_oneof
int index_in_oneof() const
google::protobuf::ServiceDescriptor::OptionsType
ServiceOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:1357
google::protobuf::Descriptor::WELLKNOWNTYPE_LISTVALUE
@ WELLKNOWNTYPE_LISTVALUE
Definition: protobuf/src/google/protobuf/descriptor.h:316
google::protobuf::Descriptor::ExtensionRange
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:348
google::protobuf::FieldDescriptor::lazy_default_value_enum_name_
const char * lazy_default_value_enum_name_
Definition: protobuf/src/google/protobuf/descriptor.h:955
google::protobuf::python::cdescriptor_pool::FindFileByName
static PyObject * FindFileByName(PyObject *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:258
google::protobuf.internal::SymbolBaseN
Definition: protobuf/src/google/protobuf/descriptor.h:238
google::protobuf::FieldDescriptor::default_value_uint64_t_
uint64_t default_value_uint64_t_
Definition: protobuf/src/google/protobuf/descriptor.h:949
element_name
std::string element_name
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:3096
google::protobuf::FieldDescriptor::default_value_uint32
uint32_t default_value_uint32() const
Definition: protobuf/src/google/protobuf/descriptor.h:764
google::protobuf::FieldDescriptor::label
Label label() const
google::protobuf::EnumDescriptor::index
int index() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2107
google::protobuf::FieldDescriptor::json_name
const std::string & json_name() const
false
#define false
Definition: setup_once.h:323
uint16_t
unsigned short uint16_t
Definition: stdint-msvc2008.h:79
google::protobuf::EnumDescriptor::IsReservedNumber
bool IsReservedNumber(int number) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2033
PROTOBUF_DEFINE_OPTIONS_ACCESSOR
#define PROTOBUF_DEFINE_OPTIONS_ACCESSOR(CLASS, TYPE)
Definition: protobuf/src/google/protobuf/descriptor.h:2076
google::protobuf::Descriptor::all_names_
const std::string * all_names_
Definition: protobuf/src/google/protobuf/descriptor.h:560
google::protobuf::FieldDescriptor::has_optional_keyword
bool has_optional_keyword() const
google::protobuf::PROTOBUF_DEFINE_ARRAY_ACCESSOR
PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension_range, const Descriptor::ExtensionRange *) PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor
google::protobuf::FieldDescriptor::file_
const FileDescriptor * file_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:786
google::protobuf::DescriptorPool::unused_import_track_files_
std::map< std::string, bool > unused_import_track_files_
Definition: protobuf/src/google/protobuf/descriptor.h:2051
google::protobuf::FileDescriptor::SYNTAX_PROTO2
@ SYNTAX_PROTO2
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1393
FieldOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:4590
google::protobuf::SourceLocation::start_column
int start_column
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:148
GOOGLE_DCHECK
#define GOOGLE_DCHECK
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:194
phone_pb2.message_type
message_type
Definition: phone_pb2.py:200
google::protobuf::ServiceDescriptor::index
int index() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2123
google::protobuf::FieldDescriptor::FieldDescriptor
FieldDescriptor()
Definition: protobuf/src/google/protobuf/descriptor.h:969
file_
FileDescriptorProto * file_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/annotation_test_util.cc:68
options
double_dict options[]
Definition: capstone_test.c:55
google::protobuf::DescriptorPool::ErrorCollector
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1630
UnknownField
Definition: upb/upb/util/compare_test.cc:66
google::protobuf::FieldDescriptor::message_type
const Descriptor * message_type
Definition: protobuf/src/google/protobuf/descriptor.h:936
UninterpretedOption
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:6089
FileOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:3696
FieldDescriptorProto
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:1851
FileDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:128
DebugString
std::string DebugString(const google::protobuf::Message &message)
Definition: bloaty/tests/test.h:60
google::protobuf::Descriptor::WELLKNOWNTYPE_UNSPECIFIED
@ WELLKNOWNTYPE_UNSPECIFIED
Definition: protobuf/src/google/protobuf/descriptor.h:297
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
google::protobuf::FieldDescriptor::TYPE_BYTES
@ TYPE_BYTES
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:538
type_
std::string type_
Definition: client_channel_stress_test.cc:212
google::protobuf::FieldDescriptor::type_name
const char * type_name() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2135
google::protobuf.internal::call_once
void call_once(Args &&... args)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/once.h:45
google::protobuf::FieldDescriptor::containing_type
const Descriptor * containing_type() const
file
Definition: bloaty/third_party/zlib/examples/gzappend.c:170
ServiceDescriptorProto
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:3186
google::protobuf::MethodDescriptor::Proto
MethodDescriptorProto Proto
Definition: protobuf/src/google/protobuf/descriptor.h:1396
google::protobuf::EnumDescriptor::EnumDescriptor
EnumDescriptor()
Definition: protobuf/src/google/protobuf/descriptor.h:1214
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
Syntax
Syntax
Definition: bloaty/third_party/protobuf/src/google/protobuf/type.pb.h:155
google::protobuf::Descriptor::ExtensionRange::Proto
DescriptorProto_ExtensionRange Proto
Definition: protobuf/src/google/protobuf/descriptor.h:399
google::protobuf::ServiceDescriptor::all_names_
const std::string * all_names_
Definition: protobuf/src/google/protobuf/descriptor.h:1372
google::protobuf::MethodDescriptor::file
const FileDescriptor * file() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2127
google::protobuf::OneofDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:843
pool_
DescriptorPool pool_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:181
MethodDescriptorProto
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:3405
setup.name
name
Definition: setup.py:542
google::protobuf::DebugStringOptions::include_comments
bool include_comments
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:165
grpc::protobuf::DescriptorPool
GRPC_CUSTOM_DESCRIPTORPOOL DescriptorPool
Definition: include/grpcpp/impl/codegen/config_protobuf.h:82
google::protobuf::DescriptorPool::internal_set_underlay
void internal_set_underlay(const DescriptorPool *underlay)
Definition: protobuf/src/google/protobuf/descriptor.h:1953
check_documentation.path
path
Definition: check_documentation.py:57
google::protobuf::OneofDescriptor::file
const FileDescriptor * file() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2099
google::protobuf::SourceLocation
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:145
google::protobuf::FieldDescriptor::LABEL_OPTIONAL
@ LABEL_OPTIONAL
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:572
google::protobuf::EnumValueDescriptor::EnumValueDescriptor
EnumValueDescriptor()
Definition: protobuf/src/google/protobuf/descriptor.h:1300
google::protobuf::DescriptorPool::EnforceWeakDependencies
void EnforceWeakDependencies(bool enforce)
Definition: protobuf/src/google/protobuf/descriptor.h:1882
name_
const std::string name_
Definition: priority.cc:233
google::protobuf::FieldDescriptor::TYPE_GROUP
@ TYPE_GROUP
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:535
google::protobuf::Reflection
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.h:397
google::protobuf::Descriptor::enum_types_
EnumDescriptor * enum_types_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:468
google::protobuf::SourceLocation::trailing_comments
std::string trailing_comments
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:154
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
google::protobuf::Descriptor::OptionsType
MessageOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:517
google::protobuf::Descriptor::ExtensionRange::OptionsType
ExtensionRangeOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:401
google::protobuf::FieldDescriptor::extension_scope
const Descriptor * extension_scope
Definition: protobuf/src/google/protobuf/descriptor.h:933
google::protobuf::OneofDescriptor::all_names_
const std::string * all_names_
Definition: protobuf/src/google/protobuf/descriptor.h:1041
google::protobuf::DescriptorPool::InternalSetLazilyBuildDependencies
void InternalSetLazilyBuildDependencies()
Definition: protobuf/src/google/protobuf/descriptor.h:1945
ExtensionRangeOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:1680
message
char * message
Definition: libuv/docs/code/tty-gravity/main.c:12
google::protobuf::python::cdescriptor_pool::FindServiceByName
static PyObject * FindServiceByName(PyObject *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:360
google::protobuf::FileDescriptor::syntax_
Syntax syntax_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1473
google::protobuf::MethodDescriptor::service_
const ServiceDescriptor * service_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1299
EnumValueDescriptorProto
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:2972
google::protobuf::OneofDescriptor::field
const FieldDescriptor * field(int index) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2179
Descriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:121
EnumOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:5086
google::protobuf::EnumDescriptor::sequential_value_limit_
int16_t sequential_value_limit_
Definition: protobuf/src/google/protobuf/descriptor.h:1193
google::protobuf::FileDescriptor::syntax
Syntax syntax() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2175
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
google::protobuf::SourceLocation::leading_comments
std::string leading_comments
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:153
google::protobuf::FieldDescriptor::is_required
bool is_required() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2059
FieldDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:133
google::protobuf::Descriptor::WELLKNOWNTYPE_INT64VALUE
@ WELLKNOWNTYPE_INT64VALUE
Definition: protobuf/src/google/protobuf/descriptor.h:302
google::protobuf::EnumValueDescriptor::OptionsType
EnumValueOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:1276
google::protobuf::ServiceDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1152
google::protobuf::python::cdescriptor_pool::FindFileContainingSymbol
static PyObject * FindFileContainingSymbol(PyObject *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:400
google::protobuf::FileDescriptor::enum_types_
EnumDescriptor * enum_types_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1486
google::protobuf::FieldDescriptor::has_presence
bool has_presence() const
start
static uint64_t start
Definition: benchmark-pound.c:74
google::protobuf::python::cdescriptor_pool::FindExtensionByNumber
static PyObject * FindExtensionByNumber(PyObject *self, PyObject *args)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:420
google::protobuf::FieldDescriptor::cpp_type_name
const char * cpp_type_name() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2143
google::protobuf::Descriptor::WELLKNOWNTYPE_TIMESTAMP
@ WELLKNOWNTYPE_TIMESTAMP
Definition: protobuf/src/google/protobuf/descriptor.h:314
google::protobuf::SourceLocation::start_line
int start_line
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:146
google::protobuf::EnumDescriptor::Proto
EnumDescriptorProto Proto
Definition: protobuf/src/google/protobuf/descriptor.h:1062
int16_t
signed short int16_t
Definition: stdint-msvc2008.h:76
google::protobuf::FileDescriptor::dependencies_once_
LazyInitData * dependencies_once_
Definition: protobuf/src/google/protobuf/descriptor.h:1632
google::protobuf::python::service_descriptor::FindMethodByName
static PyObject * FindMethodByName(PyBaseDescriptor *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor.cc:1685
benchmark.syntax
syntax
Definition: benchmark.py:90
google::protobuf::ConstStringParam
const std::string & ConstStringParam
Definition: third_party/protobuf/src/google/protobuf/stubs/port.h:129
DescriptorProto_ExtensionRange
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:936
google::protobuf.internal::once_flag
std::once_flag once_flag
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/once.h:43
end
char * end
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1008
google::protobuf::FileDescriptor::LazyInitData::once
internal::once_flag once
Definition: protobuf/src/google/protobuf/descriptor.h:1627
google::protobuf::EnumDescriptor::name
const std::string & name() const
gen_synthetic_protos.label
label
Definition: gen_synthetic_protos.py:102
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
google::protobuf::FieldDescriptor::containing_oneof
const OneofDescriptor * containing_oneof
Definition: protobuf/src/google/protobuf/descriptor.h:932
google::protobuf::FieldDescriptor::TypeOnceInit
static void TypeOnceInit(const FieldDescriptor *to_init)
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:7185
google::protobuf::DescriptorPool::ErrorCollector::ErrorCollector
ErrorCollector()
Definition: protobuf/src/google/protobuf/descriptor.h:1804
gmock_output_test.output
output
Definition: bloaty/third_party/googletest/googlemock/test/gmock_output_test.py:175
Type
Definition: bloaty/third_party/protobuf/src/google/protobuf/type.pb.h:182
google::protobuf::EnumDescriptor::FindReservedRangeContainingNumber
const EnumDescriptor::ReservedRange * FindReservedRangeContainingNumber(int number) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:1819
google::protobuf::FieldDescriptor::TypeName
static const char * TypeName(Type type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2151
google::protobuf::FieldDescriptor::file
const FileDescriptor * file() const
google::protobuf::python::cdescriptor_pool::FindFieldByName
PyObject * FindFieldByName(PyDescriptorPool *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:275
google::protobuf::FieldDescriptor::is_packable
bool is_packable() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2071
google::protobuf::python::cdescriptor_pool::FindExtensionByName
PyObject * FindExtensionByName(PyDescriptorPool *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:296
google::protobuf::FieldDescriptor::all_names_
const std::string * all_names_
Definition: protobuf/src/google/protobuf/descriptor.h:924
google::protobuf::Descriptor::__WELLKNOWNTYPE__DO_NOT_USE__ADD_DEFAULT_INSTEAD__
@ __WELLKNOWNTYPE__DO_NOT_USE__ADD_DEFAULT_INSTEAD__
Definition: protobuf/src/google/protobuf/descriptor.h:321
google::protobuf::FieldDescriptor::json_name_index_
uint8_t json_name_index_
Definition: protobuf/src/google/protobuf/descriptor.h:920
google::protobuf::DebugStringOptions::elide_group_body
bool elide_group_body
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:167
google::protobuf::OneofDescriptor::Proto
OneofDescriptorProto Proto
Definition: protobuf/src/google/protobuf/descriptor.h:981
google::protobuf::StringPiece
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/stringpiece.h:180
google::protobuf::FieldDescriptor::camelcase_name_index_
uint8_t camelcase_name_index_
Definition: protobuf/src/google/protobuf/descriptor.h:919
google::protobuf::FieldDescriptor::IsTypePackable
static bool IsTypePackable(Type field_type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2159
google::protobuf::EnumDescriptor::file
const FileDescriptor * file() const
client_streaming
void client_streaming(grpc_end2end_test_config config)
Definition: client_streaming.cc:267
grpc::protobuf::MethodDescriptor
GRPC_CUSTOM_METHODDESCRIPTOR MethodDescriptor
Definition: include/grpcpp/impl/codegen/config_protobuf.h:87
uint64_t
unsigned __int64 uint64_t
Definition: stdint-msvc2008.h:90
google::protobuf::EnumDescriptor::IsReservedName
bool IsReservedName(const std::string &name) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2037
google::protobuf::FieldDescriptor::label_
uint8_t label_
Definition: protobuf/src/google/protobuf/descriptor.h:906
google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation
ErrorLocation
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1638
google::protobuf::FileDescriptor::weak_dependencies_
int * weak_dependencies_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1484
google::protobuf::FileDescriptor::message_types_
Descriptor * message_types_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1485
google::protobuf::Descriptor::WELLKNOWNTYPE_DOUBLEVALUE
@ WELLKNOWNTYPE_DOUBLEVALUE
Definition: protobuf/src/google/protobuf/descriptor.h:300
google::protobuf::FieldDescriptor::LABEL_REQUIRED
@ LABEL_REQUIRED
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:573
google::protobuf::DescriptorPool
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1539
MessageOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:4359
google::protobuf::reserved_range
reserved_range
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1910
google::protobuf::Descriptor::FindReservedRangeContainingNumber
const ReservedRange * FindReservedRangeContainingNumber(int number) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:1807
number
int32_t number
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:850
google::protobuf::FileDescriptor::Proto
FileDescriptorProto Proto
Definition: protobuf/src/google/protobuf/descriptor.h:1483
google::protobuf::MethodDescriptor::OptionsType
MethodOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:1444
google::protobuf.internal::SymbolBase
Definition: protobuf/src/google/protobuf/descriptor.h:227
EnumValueDescriptor
Definition: protobuf/php/ext/google/protobuf/def.c:63
google::protobuf::MethodDescriptor::service
const ServiceDescriptor * service() const
google::protobuf::Descriptor::nested_types_
Descriptor * nested_types_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:467
google::protobuf::Descriptor::WellKnownType
WellKnownType
Definition: protobuf/src/google/protobuf/descriptor.h:296
google::protobuf::FieldDescriptor::CppTypeName
static const char * CppTypeName(CppType cpp_type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2155
google::protobuf::FieldDescriptor::LABEL_REPEATED
@ LABEL_REPEATED
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:574
generated_pool
InternalDescriptorPool * generated_pool
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/def.c:582
google::protobuf::Descriptor::Proto
DescriptorProto Proto
Definition: protobuf/src/google/protobuf/descriptor.h:249
io
grpc::protobuf::DescriptorDatabase
GRPC_CUSTOM_DESCRIPTORDATABASE DescriptorDatabase
Definition: include/grpcpp/impl/codegen/config_protobuf.h:83
google::protobuf::EnumValueDescriptor::type_
const EnumDescriptor * type_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1135
phone_pb2.containing_type
containing_type
Definition: phone_pb2.py:199
google::protobuf::Descriptor::extensions_
FieldDescriptor * extensions_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:470
google::protobuf::EnumDescriptor::values_
EnumValueDescriptor * values_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1047
cpp
Definition: third_party/bloaty/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py:1
FileDescriptorProto
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:501
google::protobuf::OneofDescriptor::OneofDescriptor
OneofDescriptor()
Definition: protobuf/src/google/protobuf/descriptor.h:1051
google::protobuf::FieldDescriptor::label_
Label label_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:791
google::protobuf::ServiceDescriptor::file
const FileDescriptor * file() const
EnumDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:143
google::protobuf::FieldDescriptor::lowercase_name_index_
uint8_t lowercase_name_index_
Definition: protobuf/src/google/protobuf/descriptor.h:918
google::protobuf::FieldDescriptor::type_once_
internal::once_flag * type_once_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:787
google::protobuf::DebugStringOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:160
google::protobuf::ServiceDescriptor::methods_
MethodDescriptor * methods_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1215
google::protobuf::MethodDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1234
google::protobuf::EnumDescriptor::ReservedRange
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:974
google::protobuf::FieldDescriptor::camelcase_name
const std::string & camelcase_name() const
google::protobuf::SourceLocation::end_line
int end_line
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:147
google::protobuf::Descriptor::fields_
FieldDescriptor * fields_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:465
google::protobuf::Descriptor::WELLKNOWNTYPE_ANY
@ WELLKNOWNTYPE_ANY
Definition: protobuf/src/google/protobuf/descriptor.h:311
ServiceOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:5473
google::protobuf::FileDescriptor::weak_dependency
const FileDescriptor * weak_dependency(int index) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2171
google::protobuf::FieldDescriptor::enum_type
const EnumDescriptor * enum_type
Definition: protobuf/src/google/protobuf/descriptor.h:937
google::protobuf::FileDescriptor::LazyInitData
Definition: protobuf/src/google/protobuf/descriptor.h:1625
absl::container_internal::internal_layout::adl_barrier::TypeName
std::string TypeName()
Definition: abseil-cpp/absl/container/internal/layout.h:295
google::protobuf.internal.wire_format.IsTypePackable
def IsTypePackable(field_type)
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/wire_format.py:259
google::protobuf::Descriptor::well_known_type_
uint8_t well_known_type_
Definition: protobuf/src/google/protobuf/descriptor.h:546
google::protobuf::DescriptorDatabase
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor_database.h:71
google::protobuf::DescriptorPool::AllowUnknownDependencies
void AllowUnknownDependencies()
Definition: protobuf/src/google/protobuf/descriptor.h:1876
google::protobuf::DescriptorPool::DisallowEnforceUtf8
void DisallowEnforceUtf8()
Definition: protobuf/src/google/protobuf/descriptor.h:1918
google::protobuf::io::Printer
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/printer.h:181
SYNTAX_PROTO3
@ SYNTAX_PROTO3
Definition: bloaty/third_party/protobuf/src/google/protobuf/type.pb.h:157
google::protobuf::FileDescriptor::extensions_
FieldDescriptor * extensions_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1488
google::protobuf::FieldDescriptor::default_value_uint64
uint64_t default_value_uint64() const
Definition: protobuf/src/google/protobuf/descriptor.h:768
SYNTAX_PROTO2
@ SYNTAX_PROTO2
Definition: bloaty/third_party/protobuf/src/google/protobuf/type.pb.h:156
google::protobuf::EnumDescriptor::OptionsType
EnumOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:1153
google::protobuf::DebugStringOptions::elide_oneof_body
bool elide_oneof_body
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:168
google::protobuf.internal::SymbolBase::symbol_type_
uint8_t symbol_type_
Definition: protobuf/src/google/protobuf/descriptor.h:230
google::protobuf::FieldDescriptor::scope_
union google::protobuf::FieldDescriptor::@481 scope_
google::protobuf::FieldDescriptor::is_extension_
bool is_extension_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:796
number_
int number_
Definition: bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:2671
contents
string_view contents
Definition: elf.cc:597
google::protobuf::Descriptor::real_oneof_decl_count_
int real_oneof_decl_count_
Definition: protobuf/src/google/protobuf/descriptor.h:576
google::protobuf::Descriptor::sequential_field_limit_
uint16_t sequential_field_limit_
Definition: protobuf/src/google/protobuf/descriptor.h:555
google::protobuf::Message
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.h:205
google::protobuf::DescriptorPool::ErrorCollector::AddWarning
virtual void AddWarning(const std::string &, const std::string &, const Message *, ErrorLocation, const std::string &)
Definition: protobuf/src/google/protobuf/descriptor.h:1836
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
google::protobuf::EnumValueDescriptor::all_names_
const std::string * all_names_
Definition: protobuf/src/google/protobuf/descriptor.h:1292
scope_
UniquePtr< char > scope_
Definition: oauth2_credentials.cc:652
google::protobuf::FieldDescriptor::type
Type type() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2052
google::protobuf::FileDescriptor::LazyInitData::dependencies_names
const char ** dependencies_names
Definition: protobuf/src/google/protobuf/descriptor.h:1629
google::protobuf::Descriptor::reserved_names_
const std::string ** reserved_names_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:472
google::protobuf::Descriptor::ReservedRange
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:399
options_
DebugStringOptions options_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:2390
google::protobuf::FieldDescriptor::type_
uint8_t type_
Definition: protobuf/src/google/protobuf/descriptor.h:909
OneofDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:138
google::protobuf::DebugStringOptions::DebugStringOptions
DebugStringOptions()
Definition: protobuf/src/google/protobuf/descriptor.h:174
google::protobuf::Descriptor::reserved_name_count
int reserved_name_count() const
EnumDescriptorProto
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:2705
google::protobuf::SourceLocation::leading_detached_comments
std::vector< std::string > leading_detached_comments
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:155
google::protobuf::FieldDescriptor::default_value_int32_t_
int32_t default_value_int32_t_
Definition: protobuf/src/google/protobuf/descriptor.h:946
google::protobuf::FieldDescriptor::is_oneof_
bool is_oneof_
Definition: protobuf/src/google/protobuf/descriptor.h:903
EnumValueOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:5287
google::protobuf::Descriptor::WELLKNOWNTYPE_BOOLVALUE
@ WELLKNOWNTYPE_BOOLVALUE
Definition: protobuf/src/google/protobuf/descriptor.h:308
google::protobuf::Symbol
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:77
google::protobuf::Descriptor::WELLKNOWNTYPE_FIELDMASK
@ WELLKNOWNTYPE_FIELDMASK
Definition: protobuf/src/google/protobuf/descriptor.h:312
phone_pb2.containing_oneof
containing_oneof
Definition: phone_pb2.py:204
google::protobuf::FileDescriptor::dependency
const FileDescriptor * dependency(int index) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:7235
google::protobuf::FieldDescriptor::kTypeToName
static const char *const kTypeToName[MAX_TYPE+1]
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:826
index
int index
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:1184
google::protobuf::Descriptor::oneof_decls_
OneofDescriptor * oneof_decls_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:466
google::protobuf::OneofDescriptor::index
int index() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2103
google::protobuf::FieldDescriptor::real_containing_oneof
const OneofDescriptor * real_containing_oneof() const
google::protobuf::FieldDescriptor::index
int index() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2081
field_type
zend_class_entry * field_type
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/message.c:2030
google::protobuf::Descriptor::name
const std::string & name() const
SourceCodeInfo
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:6683
google::protobuf::SourceLocation::end_column
int end_column
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:149
google::protobuf::Descriptor::file
const FileDescriptor * file() const
OneofDescriptorProto
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:2328
DescriptorProto
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:1312
google::protobuf::EnumValueDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1075
google::protobuf::FieldDescriptor::proto3_optional_
bool proto3_optional_
Definition: protobuf/src/google/protobuf/descriptor.h:898
GOOGLE_CHECK
#define GOOGLE_CHECK(EXPRESSION)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:153
google::protobuf::python::cdescriptor_pool::FindAllExtensions
static PyObject * FindAllExtensions(PyObject *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/descriptor_pool.cc:453
google::protobuf::Descriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:231
google::protobuf::FieldDescriptor::TYPE_MESSAGE
@ TYPE_MESSAGE
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:536
google::protobuf::Descriptor::IsReservedName
bool IsReservedName(const std::string &name) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2018
OneofOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:4915
google::protobuf::ServiceDescriptor::file_
const FileDescriptor * file_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1213
google::protobuf::EnumValueDescriptor::Proto
EnumValueDescriptorProto Proto
Definition: protobuf/src/google/protobuf/descriptor.h:1234
server_streaming
void server_streaming(grpc_end2end_test_config config)
Definition: server_streaming.cc:274
google::protobuf::EnumDescriptor::reserved_name
const std::string & reserved_name(int index) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2048
google::protobuf::EnumDescriptor::reserved_name_count
int reserved_name_count() const
google::protobuf::Descriptor::well_known_type
WellKnownType well_known_type() const
google::protobuf::ServiceDescriptor::ServiceDescriptor
ServiceDescriptor()
Definition: protobuf/src/google/protobuf/descriptor.h:1382
google::protobuf::Descriptor::WELLKNOWNTYPE_UINT64VALUE
@ WELLKNOWNTYPE_UINT64VALUE
Definition: protobuf/src/google/protobuf/descriptor.h:303
google::protobuf::Descriptor::Descriptor
Descriptor()
Definition: protobuf/src/google/protobuf/descriptor.h:589
google::protobuf::FileDescriptor::services_
ServiceDescriptor * services_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1487
google::protobuf::FieldDescriptor::default_value_int64_t_
int64_t default_value_int64_t_
Definition: protobuf/src/google/protobuf/descriptor.h:947
pool
InternalDescriptorPool * pool
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:807
google::protobuf::FileDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1320
google::protobuf::EnumDescriptor::all_names_
const std::string * all_names_
Definition: protobuf/src/google/protobuf/descriptor.h:1198
TYPE
#define TYPE(u, l)
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/upb.c:8202
google::protobuf.internal::LazyDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:182
grpc::protobuf::SourceLocation
GRPC_CUSTOM_SOURCELOCATION SourceLocation
Definition: include/grpcpp/impl/codegen/config_protobuf.h:90
google::protobuf::FileDescriptorTables
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:703
google::protobuf::OneofDescriptor::containing_type_
const Descriptor * containing_type_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:899
google::protobuf::FieldDescriptor::Proto
FieldDescriptorProto Proto
Definition: protobuf/src/google/protobuf/descriptor.h:614
fields_
std::vector< const FieldDescriptor * > fields_
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc:81
internal
Definition: benchmark/test/output_test_helper.cc:20
cpp.tokenize.NAME
string NAME
Definition: bloaty/third_party/googletest/googlemock/scripts/generator/cpp/tokenize.py:56
google::protobuf::FieldDescriptor::is_map_message_type
bool is_map_message_type() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:1937
google::protobuf::DescriptorBuilder
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:3104
google::protobuf::FieldDescriptor::default_value_int64
int64_t default_value_int64() const
Definition: protobuf/src/google/protobuf/descriptor.h:760
google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE
@ CPPTYPE_MESSAGE
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:563
google::protobuf::Descriptor::IsReservedNumber
bool IsReservedNumber(int number) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2014
google::protobuf::FieldDescriptor::is_optional
bool is_optional() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2063
mutex_
internal::WrappedMutex mutex_
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:569
google::protobuf::OneofDescriptor::fields_
const FieldDescriptor * fields_
Definition: protobuf/src/google/protobuf/descriptor.h:1044
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
google::protobuf::Descriptor::WELLKNOWNTYPE_FLOATVALUE
@ WELLKNOWNTYPE_FLOATVALUE
Definition: protobuf/src/google/protobuf/descriptor.h:301
google::protobuf::PROTOBUF_DEFINE_ACCESSOR
const Descriptor::ReservedRange * PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, containing_oneof, const OneofDescriptor *) PROTOBUF_DEFINE_ARRAY_ACCESSOR(EnumDescriptor
google::protobuf::OneofDescriptor::field_count
int field_count() const
google::protobuf::EnumDescriptor::containing_type_
const Descriptor * containing_type_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1038
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
google::protobuf::EnumValueDescriptor::file
const FileDescriptor * file() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2115
google::protobuf::FieldDescriptor::TypeToCppType
static CppType TypeToCppType(Type type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2147
google::protobuf::MethodDescriptor::MethodDescriptor
MethodDescriptor()
Definition: protobuf/src/google/protobuf/descriptor.h:1471
mkowners.depth
depth
Definition: mkowners.py:114
int32_t
signed int int32_t
Definition: stdint-msvc2008.h:77
google::protobuf::FieldDescriptor::lowercase_name
const std::string & lowercase_name() const
google::protobuf::EnumDescriptor
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:918
google::protobuf::EnumValueDescriptor::index
int index() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2119
DescriptorPool
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:110
google::protobuf::Descriptor::WELLKNOWNTYPE_DURATION
@ WELLKNOWNTYPE_DURATION
Definition: protobuf/src/google/protobuf/descriptor.h:313
phone_pb2.enum_type
enum_type
Definition: phone_pb2.py:198
google::protobuf::FileDescriptor::public_dependency
const FileDescriptor * public_dependency(int index) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2166
MethodOptions
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:5659
google::protobuf::EnumDescriptor::reserved_names_
const std::string ** reserved_names_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1052
google::protobuf::Descriptor::WELLKNOWNTYPE_VALUE
@ WELLKNOWNTYPE_VALUE
Definition: protobuf/src/google/protobuf/descriptor.h:315
descriptor
static const char descriptor[1336]
Definition: certs.upbdefs.c:16
google::protobuf::OneofDescriptor::containing_type
const Descriptor * containing_type() const
google::protobuf::FieldDescriptor::is_repeated
bool is_repeated() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2067
PROTOBUF_DEFINE_STRING_ACCESSOR
#define PROTOBUF_DEFINE_STRING_ACCESSOR(CLASS, FIELD)
Definition: protobuf/src/google/protobuf/descriptor.h:2064
google::protobuf::FieldDescriptor::TYPE_STRING
@ TYPE_STRING
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:534
google::protobuf::Descriptor::index
int index() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2091
grpc::protobuf::ServiceDescriptor
GRPC_CUSTOM_SERVICEDESCRIPTOR ServiceDescriptor
Definition: include/grpcpp/impl/codegen/config_protobuf.h:88
google::protobuf::FieldDescriptor::cpp_type
CppType cpp_type() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2139
google::protobuf::Descriptor::FindExtensionRangeContainingNumber
const ExtensionRange * FindExtensionRangeContainingNumber(int number) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:1795
google::protobuf::FieldDescriptor::kTypeToCppTypeMap
static const CppType kTypeToCppTypeMap[MAX_TYPE+1]
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:824
google::protobuf::FieldDescriptor::CppType
CppType
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:553
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::FieldDescriptor::kCppTypeToName
static const char *const kCppTypeToName[MAX_CPPTYPE+1]
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:828
google::protobuf::compiler::cpp::Formatter
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h:637
Message
Definition: protobuf/php/ext/google/protobuf/message.c:53
google::protobuf::FileDescriptor::Syntax
Syntax
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1391
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
google::protobuf::method
const Descriptor::ReservedRange const EnumValueDescriptor method
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1973
google::protobuf.internal::cpp_type
FieldDescriptor::CppType cpp_type(FieldType type)
Definition: bloaty/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc:133
google::protobuf::Descriptor::file_
const FileDescriptor * file_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:460
google::protobuf::Descriptor::containing_type_
const Descriptor * containing_type_
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:461
type_name
static const char * type_name(int type)
Definition: adig.c:889
google::protobuf::FileDescriptor::OptionsType
FileOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:1618
service_
std::unique_ptr< grpc::testing::TestServiceImpl > service_
Definition: end2end_binder_transport_test.cc:71
google::protobuf::descriptor_unittest::DescriptorTest
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor_unittest.cc:613
framework.helpers.highlighter.Formatter
Formatter
Definition: highlighter.py:53
google::protobuf::FileDescriptor::FileDescriptor
FileDescriptor()
Definition: protobuf/src/google/protobuf/descriptor.h:1670
google::protobuf::Descriptor::WELLKNOWNTYPE_BYTESVALUE
@ WELLKNOWNTYPE_BYTESVALUE
Definition: protobuf/src/google/protobuf/descriptor.h:307
google::protobuf::FieldDescriptor::is_map
bool is_map() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:2075
google::protobuf::service
const Descriptor::ReservedRange const EnumDescriptor::ReservedRange service
Definition: protobuf/src/google/protobuf/descriptor.h:2177
google::protobuf::FieldDescriptor::OptionsType
FieldOptions OptionsType
Definition: protobuf/src/google/protobuf/descriptor.h:868
google::protobuf::Descriptor::WELLKNOWNTYPE_STRINGVALUE
@ WELLKNOWNTYPE_STRINGVALUE
Definition: protobuf/src/google/protobuf/descriptor.h:306


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