protobuf-c 1.5.1
Protocol Buffers implementation in C
ProtobufCFieldDescriptor Struct Reference

Describes a single field in a message. More...

Data Fields

const char * name
 Name of the field as given in the .proto file.
 
uint32_t id
 Tag value of the field as given in the .proto file.
 
ProtobufCLabel label
 Whether the field is REQUIRED, OPTIONAL, or REPEATED.
 
ProtobufCType type
 The type of the field.
 
unsigned quantifier_offset
 The offset in bytes of the message's C structure's quantifier field (the has_MEMBER field for optional members or the n_MEMBER field for repeated members or the case enum for oneofs).
 
unsigned offset
 The offset in bytes into the message's C structure for the member itself.
 
const void * descriptor
 A type-specific descriptor.
 
const void * default_value
 The default value for this field, if defined.
 
uint32_t flags
 A flag word.
 
unsigned reserved_flags
 Reserved for future use.
 
void * reserved2
 Reserved for future use.
 
void * reserved3
 Reserved for future use.
 

Detailed Description

Describes a single field in a message.

Field Documentation

◆ name

const char* ProtobufCFieldDescriptor::name

Name of the field as given in the .proto file.

◆ id

uint32_t ProtobufCFieldDescriptor::id

Tag value of the field as given in the .proto file.

◆ label

ProtobufCLabel ProtobufCFieldDescriptor::label

Whether the field is REQUIRED, OPTIONAL, or REPEATED.

◆ type

ProtobufCType ProtobufCFieldDescriptor::type

The type of the field.

◆ quantifier_offset

unsigned ProtobufCFieldDescriptor::quantifier_offset

The offset in bytes of the message's C structure's quantifier field (the has_MEMBER field for optional members or the n_MEMBER field for repeated members or the case enum for oneofs).

◆ offset

unsigned ProtobufCFieldDescriptor::offset

The offset in bytes into the message's C structure for the member itself.

◆ descriptor

const void* ProtobufCFieldDescriptor::descriptor

A type-specific descriptor.

If type is PROTOBUF_C_TYPE_ENUM, then descriptor points to the corresponding ProtobufCEnumDescriptor.

If type is PROTOBUF_C_TYPE_MESSAGE, then descriptor points to the corresponding ProtobufCMessageDescriptor.

Otherwise this field is NULL.

◆ default_value

const void* ProtobufCFieldDescriptor::default_value

The default value for this field, if defined.

May be NULL.

◆ flags

uint32_t ProtobufCFieldDescriptor::flags

A flag word.

Zero or more of the bits defined in the ProtobufCFieldFlag enum may be set.

◆ reserved_flags

unsigned ProtobufCFieldDescriptor::reserved_flags

Reserved for future use.

◆ reserved2

void* ProtobufCFieldDescriptor::reserved2

Reserved for future use.

◆ reserved3

void* ProtobufCFieldDescriptor::reserved3

Reserved for future use.