NRP Core  1.4.1
proto_field_ops Namespace Reference

Implement single field Get/Set operations using field descriptor and reflection interface. More...

Functions

bpy::object GetScalarField (gpb::Message &m, const gpb::FieldDescriptor *field)
 Get scalar field. Returns a copy of the field value. More...
 
std::string GetScalarFieldAsString (const gpb::Message &m, const gpb::FieldDescriptor *field)
 Get scalar field value as a string. More...
 
bpy::object GetRepeatedScalarField (gpb::Message &m, const gpb::FieldDescriptor *field, int index)
 Get repeated scalar field. Returns a copy of the field value. More...
 
void SetScalarField (gpb::Message &m, const gpb::FieldDescriptor *field, const bpy::object &value)
 Set scalar field. More...
 
void SetRepeatedScalarField (gpb::Message &m, const gpb::FieldDescriptor *field, const bpy::object &value, int index)
 Set repeated scalar field. More...
 
void AddRepeatedScalarField (gpb::Message &m, const gpb::FieldDescriptor *field, const bpy::object &value)
 Append repeated scalar field. More...
 
template<class MSG , class ... REMAINING_MSGS>
bpy::object GetMessageField (gpb::Message &m, const gpb::FieldDescriptor *field)
 Get message field. Returns a reference of the field value. More...
 

Detailed Description

Implement single field Get/Set operations using field descriptor and reflection interface.

Function Documentation

◆ AddRepeatedScalarField()

void proto_field_ops::AddRepeatedScalarField ( gpb::Message &  m,
const gpb::FieldDescriptor *  field,
const bpy::object &  value 
)

Append repeated scalar field.

◆ GetMessageField()

template<class MSG , class ... REMAINING_MSGS>
bpy::object proto_field_ops::GetMessageField ( gpb::Message &  m,
const gpb::FieldDescriptor *  field 
)

Get message field. Returns a reference of the field value.

◆ GetRepeatedScalarField()

bpy::object proto_field_ops::GetRepeatedScalarField ( gpb::Message &  m,
const gpb::FieldDescriptor *  field,
int  index 
)

Get repeated scalar field. Returns a copy of the field value.

◆ GetScalarField()

bpy::object proto_field_ops::GetScalarField ( gpb::Message &  m,
const gpb::FieldDescriptor *  field 
)

Get scalar field. Returns a copy of the field value.

◆ GetScalarFieldAsString()

std::string proto_field_ops::GetScalarFieldAsString ( const gpb::Message &  m,
const gpb::FieldDescriptor *  field 
)

Get scalar field value as a string.

◆ SetRepeatedScalarField()

void proto_field_ops::SetRepeatedScalarField ( gpb::Message &  m,
const gpb::FieldDescriptor *  field,
const bpy::object &  value,
int  index 
)

Set repeated scalar field.

◆ SetScalarField()

void proto_field_ops::SetScalarField ( gpb::Message &  m,
const gpb::FieldDescriptor *  field,
const bpy::object &  value 
)

Set scalar field.