class EnumValueDescriptor
Defined at line 1511 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
Describes an individual enum constant of a particular type. To get the
EnumValueDescriptor for a given enum value, first get the EnumDescriptor
for its type, then use EnumDescriptor::FindValueByName() or
EnumDescriptor::FindValueByNumber(). Use DescriptorPool to construct
your own descriptors.
Public Methods
void EnumValueDescriptor (const EnumValueDescriptor & )
Defined at line 1517 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
EnumValueDescriptor & operator= (const EnumValueDescriptor & )
Defined at line 1518 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
internal::DescriptorStringView name ()
Defined at line 2607 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
int index ()
Defined at line 2813 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
int number ()
Defined at line 2608 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
internal::DescriptorStringView full_name ()
The full_name of an enum value is a sibling symbol of the enum type.
e.g. the full name of FieldDescriptorProto::TYPE_INT32 is actually
"google.protobuf.FieldDescriptorProto.TYPE_INT32", NOT
"google.protobuf.FieldDescriptorProto.Type.TYPE_INT32". This is to conform
with C++ scoping rules for enums.
Defined at line 2607 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
const FileDescriptor * file ()
The .proto file in which this value was defined. Never nullptr.
Defined at line 2809 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
const EnumDescriptor * type ()
The type of this value. Never nullptr.
Defined at line 2609 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
const EnumValueOptions & options ()
Get options for this enum value. These are specified in the .proto file by
adding text like "[foo = 1234]" after an enum value definition. Allowed
options are defined by EnumValueOptions in descriptor.proto, and any
available extensions of that message.
Defined at line 2610 of file ../../third_party/protobuf/src/google/protobuf/descriptor.h
void CopyTo (EnumValueDescriptorProto * proto)
See Descriptor::CopyTo().
std::string DebugString ()
See Descriptor::DebugString().
std::string DebugStringWithOptions (const DebugStringOptions & options)
See Descriptor::DebugStringWithOptions().
bool GetSourceLocation (SourceLocation * out_location)
Updates |*out_location| to the source location of the complete
extent of this enum value declaration. Returns false and leaves
|*out_location| unchanged iff location information was not available.
Friends
class Reflection
class FileDescriptorTables
class DescriptorPool
class EnumDescriptor
class DescriptorBuilder
class InternalFeatureHelper
const std::string & EnumValueDescriptor (const EnumValueDescriptor * descriptor)
class Formatter
class Printer
class Symbol
template <typename Sink>
void EnumValueDescriptor (Sink & sinkconst EnumValueDescriptor & d)