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... | |
Implement single field Get/Set operations using field descriptor and reflection interface.
void proto_field_ops::AddRepeatedScalarField | ( | gpb::Message & | m, |
const gpb::FieldDescriptor * | field, | ||
const bpy::object & | value | ||
) |
Append repeated scalar field.
bpy::object proto_field_ops::GetMessageField | ( | gpb::Message & | m, |
const gpb::FieldDescriptor * | field | ||
) |
Get message field. Returns a reference of the field value.
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.
bpy::object proto_field_ops::GetScalarField | ( | gpb::Message & | m, |
const gpb::FieldDescriptor * | field | ||
) |
Get scalar field. Returns a copy of the field value.
std::string proto_field_ops::GetScalarFieldAsString | ( | const gpb::Message & | m, |
const gpb::FieldDescriptor * | field | ||
) |
Get scalar field value as a string.
void proto_field_ops::SetRepeatedScalarField | ( | gpb::Message & | m, |
const gpb::FieldDescriptor * | field, | ||
const bpy::object & | value, | ||
int | index | ||
) |
Set repeated scalar field.
void proto_field_ops::SetScalarField | ( | gpb::Message & | m, |
const gpb::FieldDescriptor * | field, | ||
const bpy::object & | value | ||
) |
Set scalar field.