NRP Core  1.4.1
RepeatedScalarFieldProxy Class Reference

Proxy class implementing a list-like python wrapper for a protobuf repeated scalar field (ie. not of Message type) More...

#include <repeated_field_proxy.h>

Public Member Functions

 RepeatedScalarFieldProxy (gpb::Message &msg, const gpb::FieldDescriptor *field)
 Constructor. More...
 
int Len ()
 
bpy::object GetItem (PyObject *indices)
 
void SetItem (PyObject *indices, PyObject *value)
 
bpy::object Iter ()
 
void Append (const bpy::object &value)
 
void Extend (const bpy::object &value)
 
void Clear ()
 
void Pop ()
 

Static Public Member Functions

static void create ()
 Creates the python wrapper. More...
 

Detailed Description

Proxy class implementing a list-like python wrapper for a protobuf repeated scalar field (ie. not of Message type)

Constructor & Destructor Documentation

◆ RepeatedScalarFieldProxy()

RepeatedScalarFieldProxy::RepeatedScalarFieldProxy ( gpb::Message &  msg,
const gpb::FieldDescriptor *  field 
)
inline

Constructor.

Parameters
msgMessage storing the wrapped field
fieldField descriptor

Member Function Documentation

◆ Append()

void RepeatedScalarFieldProxy::Append ( const bpy::object &  value)
inline

/brief append

◆ Clear()

void RepeatedScalarFieldProxy::Clear ( )
inline

/brief clear

◆ create()

static void RepeatedScalarFieldProxy::create ( )
inlinestatic

Creates the python wrapper.

The python wrapper supports the usual python "list" index get/set operations and iteration. It does not support the next list methods: 'delitem', 'copy', 'count', 'index', 'insert', 'remove', 'reverse', 'sort'. It does not support comparison with a list.

◆ Extend()

void RepeatedScalarFieldProxy::Extend ( const bpy::object &  value)
inline

/brief extend

◆ GetItem()

bpy::object RepeatedScalarFieldProxy::GetItem ( PyObject *  indices)

/brief getitem

◆ Iter()

bpy::object RepeatedScalarFieldProxy::Iter ( )

/brief iter

◆ Len()

int RepeatedScalarFieldProxy::Len ( )
inline

/brief len

◆ Pop()

void RepeatedScalarFieldProxy::Pop ( )
inline

/brief pop

◆ SetItem()

void RepeatedScalarFieldProxy::SetItem ( PyObject *  indices,
PyObject *  value 
)

/brief setitem


The documentation for this class was generated from the following files: