Home | History | Annotate | Download | only in protobuf

Lines Matching refs:Descriptor

36 // You can use a message's descriptor to learn at runtime what fields
76 class Descriptor;
87 // Defined in descriptor.proto
109 // Defined in descriptor.cc
143 // See the comments in SourceCodeInfo.Location (descriptor.proto) for details.
149 // Options when generating machine-parsable output from a descriptor with
168 // message. To obtain the Descriptor for a given message object, call
170 // static method called descriptor() which returns the type's descriptor.
172 class LIBPROTOBUF_EXPORT Descriptor {
184 // Index of this descriptor within the file or containing type's message
191 // If this Descriptor describes a nested type, this returns the type
193 const Descriptor* containing_type() const;
198 // google/protobuf/descriptor.proto, and any available extensions of that
202 // Write the contents of this Descriptor into the given DescriptorProto.
216 // only be the case if this descriptor comes from a DescriptorPool
262 const Descriptor* nested_type(int index) const;
266 const Descriptor* FindNestedTypeByName(const string& name) const;
381 // Walks up the descriptor tree to generate the source location path
382 // to this descriptor from the file root.
388 const Descriptor* containing_type_;
401 Descriptor* nested_types_;
413 // of Allocate<Descriptor>() and AllocateArray<Descriptor>() in descriptor.cc
417 Descriptor() {}
424 GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(Descriptor);
427 // Describes a single field of a message. To get the descriptor for a given
428 // field, first get the Descriptor for the message in which it is defined,
429 // then call Descriptor::FindFieldByName(). To get a FieldDescriptor for
431 // - Get the Descriptor or FileDescriptor for its containing scope, then
432 // call Descriptor::FindExtensionByName() or
591 // The Descriptor for the message of which this is a field. For extensions,
593 const Descriptor* containing_type() const;
607 const Descriptor* extension_scope() const;
609 // If type is TYPE_MESSAGE or TYPE_GROUP, returns a descriptor for the
611 const Descriptor* message_type() const;
612 // If type is TYPE_ENUM, returns a descriptor for the enum. Otherwise,
620 // in google/protobuf/descriptor.proto, and any available extensions of that
624 // See Descriptor::CopyTo().
627 // See Descriptor::DebugString().
630 // See Descriptor::DebugStringWithOptions().
661 // See Descriptor::DebugString().
674 // Walks up the descriptor tree to generate the source location path
675 // to this descriptor from the file root.
694 const Descriptor* containing_type_;
696 const Descriptor* extension_scope_;
697 const Descriptor* message_type_;
702 // descriptor.cc and update them to initialize the field.
730 friend class Descriptor;
744 // The Descriptor for the message containing this oneof.
745 const Descriptor* containing_type() const;
753 // See Descriptor::CopyTo().
756 // See Descriptor::DebugString().
759 // See Descriptor::DebugStringWithOptions().
773 // See Descriptor::DebugString().
777 // Walks up the descriptor tree to generate the source location path
778 // to this descriptor from the file root.
783 const Descriptor* containing_type_;
789 // in descriptor.cc and update them to initialize the field.
794 friend class Descriptor;
830 const Descriptor* containing_type() const;
834 // options are defined by EnumOptions in google/protobuf/descriptor.proto,
838 // See Descriptor::CopyTo().
841 // See Descriptor::DebugString().
844 // See Descriptor::DebugStringWithOptions().
849 // only be the case if this descriptor comes from a DescriptorPool
868 // unknown. If a new descriptor is created, this is done in a thread-safe way,
869 // and future calls will return the same value descriptor pointer.
878 // See Descriptor::DebugString().
882 // Walks up the descriptor tree to generate the source location path
883 // to this descriptor from the file root.
889 const Descriptor* containing_type_;
901 // descriptor.cc and update them to initialize the field.
906 friend class Descriptor;
922 int index() const; // Index within the enums's Descriptor.
938 // google/protobuf/descriptor.proto, and any available extensions of that
942 // See Descriptor::CopyTo().
945 // See Descriptor::DebugString().
948 // See Descriptor::DebugStringWithOptions().
965 // See Descriptor::DebugString().
969 // Walks up the descriptor tree to generate the source location path
970 // to this descriptor from the file root.
980 // in descriptor.cc and update them to initialize the field.
992 // static method called descriptor() which returns the type's
1009 // google/protobuf/descriptor.proto, and any available extensions of that
1021 // See Descriptor::CopyTo().
1024 // See Descriptor::DebugString().
1027 // See Descriptor::DebugStringWithOptions().
1044 // See Descriptor::DebugString().
1047 // Walks up the descriptor tree to generate the source location path
1048 // to this descriptor from the file root.
1059 // descriptor.cc and update them to initialize the field.
1079 // Index within the service's Descriptor.
1086 const Descriptor* input_type() const;
1088 const Descriptor* output_type() const;
1098 // google/protobuf/descriptor.proto, and any available extensions of that
1102 // See Descriptor::CopyTo().
1105 // See Descriptor::DebugString().
1108 // See Descriptor::DebugStringWithOptions().
1125 // See Descriptor::DebugString().
1129 // Walks up the descriptor tree to generate the source location path
1130 // to this descriptor from the file root.
1136 const Descriptor* input_type_;
1137 const Descriptor* output_type_;
1143 // descriptor.cc and update them to initialize the field.
1154 // file, get the descriptor for something defined in that file and call
1155 // descriptor->file(). Use DescriptorPool to construct your own descriptors.
1159 // e.g. "google/protobuf/descriptor.proto"
1196 const Descriptor* message_type(int index) const;
1214 // Gets an extension's descriptor, where 0 <= index < extension_count().
1221 // google/protobuf/descriptor.proto, and any available extensions of that
1235 const Descriptor* FindMessageTypeByName(const string& name) const;
1246 // Descriptor::FindFieldByLowercaseName().
1249 // Descriptor::FindFieldByCamelcaseName().
1252 // See Descriptor::CopyTo().
1264 // See Descriptor::DebugString().
1267 // See Descriptor::DebugStringWithOptions().
1271 // only be the case if this descriptor comes from a DescriptorPool
1300 Descriptor* message_types_;
1315 // descriptor.cc and update them to initialize the field.
1319 friend class Descriptor;
1342 // take a FileDescriptorProto (defined in descriptor.proto), validate it,
1372 // In fact, even the Find*By*() methods of descriptor objects owned by
1411 const Descriptor* FindMessageTypeByName(const string& name) const;
1422 const FieldDescriptor* FindExtensionByNumber(const Descriptor* extendee,
1430 void FindAllExtensions(const Descriptor* extendee,
1464 const Message* descriptor, // Descriptor of the erroneous element.
1474 const Message* /*descriptor*/, // Descriptor of the erroneous element.
1508 // and similar methods, which could confuse some descriptor-based algorithms.
1524 // If you search for a descriptor in the overlay and it is not found, the
1570 // lazy descriptor initialization behavior.
1580 friend class Descriptor;
1589 // descriptor that already exists in the descriptor pool. (The full
1599 bool TryFindExtensionInFallbackDatabase(const Descriptor* containing_type,
1647 PROTOBUF_DEFINE_STRING_ACCESSOR(Descriptor, name)
1648 PROTOBUF_DEFINE_STRING_ACCESSOR(Descriptor, full_name)
1649 PROTOBUF_DEFINE_ACCESSOR(Descriptor, file, const FileDescriptor*)
1650 PROTOBUF_DEFINE_ACCESSOR(Descriptor, containing_type, const Descriptor*)
1652 PROTOBUF_DEFINE_ACCESSOR(Descriptor, field_count, int)
1653 PROTOBUF_DEFINE_ACCESSOR(Descriptor, oneof_decl_count, int)
1654 PROTOBUF_DEFINE_ACCESSOR(Descriptor, nested_type_count, int)
1655 PROTOBUF_DEFINE_ACCESSOR(Descriptor, enum_type_count, int)
1657 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, field, const FieldDescriptor*)
1658 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, oneof_decl, const OneofDescriptor*)
1659 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, nested_type, const Descriptor*)
1660 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, enum_type, const EnumDescriptor*)
1662 PROTOBUF_DEFINE_ACCESSOR(Descriptor, extension_range_count, int)
1663 PROTOBUF_DEFINE_ACCESSOR(Descriptor, extension_count, int)
1664 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension_range,
1665 const Descriptor::ExtensionRange*)
1666 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, extension,
1669 PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_range_count, int)
1670 PROTOBUF_DEFINE_ARRAY_ACCESSOR(Descriptor, reserved_range,
1671 const Descriptor::ReservedRange*)
1672 PROTOBUF_DEFINE_ACCESSOR(Descriptor, reserved_name_count, int)
1674 PROTOBUF_DEFINE_OPTIONS_ACCESSOR(Descriptor, MessageOptions)
1675 PROTOBUF_DEFINE_ACCESSOR(Descriptor, is_placeholder, bool)
1687 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, containing_type, const Descriptor*)
1691 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, extension_scope, const Descriptor*)
1692 PROTOBUF_DEFINE_ACCESSOR(FieldDescriptor, message_type, const Descriptor*)
1709 PROTOBUF_DEFINE_ACCESSOR(OneofDescriptor, containing_type, const Descriptor*)
1715 PROTOBUF_DEFINE_ACCESSOR(EnumDescriptor, containing_type, const Descriptor*)
1739 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, input_type, const Descriptor*)
1740 PROTOBUF_DEFINE_ACCESSOR(MethodDescriptor, output_type, const Descriptor*)
1758 PROTOBUF_DEFINE_ARRAY_ACCESSOR(FileDescriptor, message_type, const Descriptor*)
1771 inline bool Descriptor::IsExtensionNumber(int number) const {
1775 inline bool Descriptor::IsReservedNumber(int number) const {
1779 inline bool Descriptor::IsReservedName(const string& name) const {
1790 inline const string& Descriptor::reserved_name(int index) const {
1810 // To save space, index() is computed by looking at the descriptor's position
1822 inline int Descriptor::index() const {