protobuf-c  1.0.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. More...
 
uint32_t id
 Tag value of the field as given in the .proto file. More...
 
ProtobufCLabel label
 Whether the field is REQUIRED, OPTIONAL, or REPEATED. More...
 
ProtobufCType type
 The type of the field. More...
 
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. More...
 
unsigned offset
 The offset in bytes into the message's C structure for the member itself. More...
 
const void * descriptor
 A type-specific descriptor. More...
 
const void * default_value
 The default value for this field, if defined. More...
 
uint32_t flags
 A flag word. More...
 
unsigned reserved_flags
 Reserved for future use. More...
 
void * reserved2
 Reserved for future use. More...
 
void * reserved3
 Reserved for future use. More...
 

Detailed Description

Describes a single field in a message.

Field Documentation

const char* ProtobufCFieldDescriptor::name

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

uint32_t ProtobufCFieldDescriptor::id

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

ProtobufCLabel ProtobufCFieldDescriptor::label

Whether the field is REQUIRED, OPTIONAL, or REPEATED.

ProtobufCType ProtobufCFieldDescriptor::type

The type of the field.

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.

unsigned ProtobufCFieldDescriptor::offset

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

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.

const void* ProtobufCFieldDescriptor::default_value

The default value for this field, if defined.

May be NULL.

uint32_t ProtobufCFieldDescriptor::flags

A flag word.

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

unsigned ProtobufCFieldDescriptor::reserved_flags

Reserved for future use.

void* ProtobufCFieldDescriptor::reserved2

Reserved for future use.

void* ProtobufCFieldDescriptor::reserved3

Reserved for future use.