Developer Documentation
|
A container storing a single property for all objects. More...
#include <ObjectTypes/Skeleton/Properties.hh>
Public Member Functions | |
PropertyT (unsigned long _size=0) | |
Creates a new property with the given size. More... | |
virtual | ~PropertyT () |
Destructor. | |
T & | operator[] (int _index) |
Direct access to the value with the given index. More... | |
Protected Member Functions | |
Synchronization | |
Called by the Properties container to keep the indices in sync. | |
void | insert_at (int _index) |
Insert element. | |
void | remove_at (int _index) |
Remove element. | |
void | clear () |
Clear the property. | |
Synchronization | |
Called by the Properties container to keep the indices in sync. |
Protected Attributes | |
std::vector< T > | values_ |
Stores a property for every object in the class derived from the Properties class. Access by index. | |
Friends | |
class | Properties |
A container storing a single property for all objects.
The template type is determined by the property handle PropertyHandleT used to add it to the Properties container.
Definition at line 135 of file Properties.hh.
Properties::PropertyT< T >::PropertyT | ( | unsigned long | _size = 0 | ) |
Creates a new property with the given size.
If a property is created when the derived class is already holding objects, it is of course not in sync with regard to the number of stored values (e.g. see Properties::PropertyT::insert_at). The _size parameter allocates the memory to get the new property in sync.
Definition at line 241 of file PropertiesT.cc.
|
inline |
Direct access to the value with the given index.
This method is used by the Properties class to gain access to the Properties values
Definition at line 265 of file PropertiesT.cc.