RobWorkProject
Public Types | Public Member Functions | List of all members
StateCache Class Referenceabstract

the basic building block for the stateless desing using the StateStructure class. A StateCache represents a size, a unique id, and a unique name, when inserted into the StateStructure. The size will allocate "size"-doubles in State objects originating from the StateStructure. More...

#include <StateCache.hpp>

Inherited by DeformableObject::DeformableObjectCache, CameraModel::CameraModelCache, Scanner25DModel::Scanner25DModelCache, Scanner2DModel::Scanner2DModelCache, TactileArrayModel::TactileModelCache, BodyContactSensor::ClassState, and TactileArraySensor::ClassState.

Public Types

typedef rw::common::Ptr< StateCachePtr
 Smart pointer type.
 

Public Member Functions

virtual ~StateCache ()
 destructor
 
virtual size_t size () const =0
 An integer ID for the StateCache. More...
 
virtual rw::common::Ptr< StateCacheclone () const =0
 this creates a deep copy of this cache
 

Detailed Description

the basic building block for the stateless desing using the StateStructure class. A StateCache represents a size, a unique id, and a unique name, when inserted into the StateStructure. The size will allocate "size"-doubles in State objects originating from the StateStructure.

Member Function Documentation

◆ size()

virtual size_t size ( ) const
pure virtual

An integer ID for the StateCache.

IDs are assigned to the state data upon insertion State. StateCache that are not in a State have an ID of -1.

StateCache present in different trees may have identical IDs.

IDs are used for the efficient implementation of State. Normally, you should not make use of frame IDs yourself.

Returns
An integer ID for the frame. The number of doubles allocated by this StateCache in each State object.
The number of doubles allocated by the StateCache

Implemented in TactileArraySensor::ClassState, DeformableObject::DeformableObjectCache, TactileArrayModel::TactileModelCache, BodyContactSensor::ClassState, Scanner2DModel::Scanner2DModelCache, CameraModel::CameraModelCache, and Scanner25DModel::Scanner25DModelCache.


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