vrecko
virtual reality framework
|
#include <DynamicAttribute.h>
Public Member Functions | |
DynamicAttribute (const string &strName, const string &strDescription, unsigned int minInstancesCount=0, unsigned int maxInstancesCount=10) | |
~DynamicAttribute () | |
unsigned int | getMinInstancesCount () const |
unsigned int | getMaxInstancesCount () const |
bool | addAttribute (Attribute *pAttribute) |
unsigned int | attributesCount () const |
bool | containsAttribute (const string &strName) const |
const Attribute * | getAttributePtr (const string &strName) const |
void | startIteration () |
bool | hasNextAttribute () const |
const Attribute * | nextAttributePtr () |
Public Member Functions inherited from vrecko::Attribute | |
const string & | getName () const |
DataType | getDataType () const |
const string & | getDescription () const |
bool | isStatic () const |
bool | isDynamic () const |
Additional Inherited Members | |
Public Types inherited from vrecko::Attribute | |
enum | DataType { TYPE_BOOL, TYPE_INT, TYPE_LONG, TYPE_FLOAT, TYPE_DOUBLE, TYPE_STRING, TYPE_VEC2, TYPE_VEC3, TYPE_VEC4, TYPE_MATRIX, TYPE_QUAT, TYPE_DYNAMIC } |
Protected Member Functions inherited from vrecko::Attribute | |
Attribute (const string &strName, DataType dataType, const string &strDescription) | |
Attribute (const Attribute &attribute) | |
Represents a dynamic attribute which can be composed of one or more static attributes.
This class serves as a container for objects of Attribute class. Therefore it can be used as a node in the attributes hierarchy. You can insert only static attributes now. More complex tree structure of the attributes hierarchy might be available later on.
|
inline |
Constructs a DynamicAttribute object.
strName | reference to a constant attribute name |
strDescription | reference to a constant attribute description |
minInstancesCount | number of min instances |
maxInstancesCount | number of max instances |
|
inline |
Performs cleanup before object destruction.
|
inline |
Adds a static attribute if not already included.
Any pointers passed to this method as parameters are used directly, no copy is made. You have to ensure a unique pointer is passed per each call of this method. Also ensure that the pointer is used only wihtin the context of this method and nowhere else and stays valid all the time. Allocated memory is freed automatically.
pAttribute | pointer to an Attribute object on the heap |
|
inline |
Returns attributes count.
|
inline |
"Contains attribute" predicate.
strName | reference to a constant attribute name used as a key for searching |
|
inline |
Returns pointer to an attribute based on its name.
strName | reference to a constant attribute name used as a key for searching |
|
inline |
Returns number of max attribute instances.
|
inline |
Returns number of min attribute instances.
|
inline |
"Has next attribute" predicate.
You have to initialize the internal interator first by calling startIteration() before you call this method!
|
inline |
Returns pointer to current attribute and increments the iterator.
You have to initialize the internal interator first by calling startIteration() before you call this method!
|
inline |
Initializes the internal iterator.