cisst-saw
|
#include <mtsStateArray.h>
Public Types | |
typedef _elementType | value_type |
typedef std::vector< value_type > | VectorType |
typedef VectorType::iterator | iterator |
typedef VectorType::const_iterator | const_iterator |
![]() | |
typedef size_t | index_type |
typedef size_t | size_type |
Public Member Functions | |
mtsStateArray (const value_type &objectExample, size_type size=0) | |
virtual | ~mtsStateArray () |
bool | SetDataSize (const size_t size) |
const value_type & | Element (index_type index) const |
value_type & | Element (index_type index) |
mtsGenericObject & | operator[] (index_type index) |
const mtsGenericObject & | operator[] (index_type index) const |
mtsStateArrayBase * | Create (const mtsGenericObject *objectExample, size_type size) |
void | Copy (index_type indexTo, index_type indexFrom) |
bool | Get (index_type index, mtsGenericObject &object) const |
bool | Set (index_type index, const mtsGenericObject &object) |
![]() | |
virtual | ~mtsStateArrayBase (void) |
bool | SetSize (const size_t size) |
Protected Attributes | |
VectorType | Data |
![]() | |
const cmnClassServicesBase * | DataClassServices |
Additional Inherited Members | |
![]() | |
mtsStateArrayBase (void) | |
Individual state array classes can be created from an instance of the following template, where _elementType represents the type of data used by the particular state element. It is assumed that _elementType is derived from mtsGenericObject.
typedef VectorType::const_iterator mtsStateArray< _elementType >::const_iterator |
typedef VectorType::iterator mtsStateArray< _elementType >::iterator |
typedef _elementType mtsStateArray< _elementType >::value_type |
typedef std::vector<value_type> mtsStateArray< _elementType >::VectorType |
|
inline |
Default constructor. Does nothing
|
inlinevirtual |
Default destructor.
|
inlinevirtual |
Copy data from one index to another within the same array.
Implements mtsStateArrayBase.
|
inlinevirtual |
Create the array of data. This is currently unused.
Implements mtsStateArrayBase.
|
inline |
Access element at index. This returns the data of the derived type (value_type) rather than the base type (mtsGenericObject), which is returned by the overloaded operator [].
|
inline |
|
virtual |
Get and Set data from array. The Get and Set member functions deserve special mention because they must overcome a limitation of C++ – namely, that it does not fully support containers of heterogeneous objects. In particular, we expect the 'object' parameter to be of type _elementType& (the derived class) rather than mtsGenericObject& (the base class). This can be handled using C++ Run Time Type Information (RTTI) features such as dynamic cast.
Implements mtsStateArrayBase.
|
inlinevirtual |
Overloaded [] operator. Returns data at index (of type mtsGenericObject). Currently used for data collection (mtsCollectorState).
Implements mtsStateArrayBase.
|
inlinevirtual |
Overloaded subscript operator.
Implements mtsStateArrayBase.
|
virtual |
Set data in array.
Implements mtsStateArrayBase.
|
inlinevirtual |
Implements mtsStateArrayBase.
|
protected |
A vector to store the data. These element of the vector represents the cell of the state data table.