vrecko
virtual reality framework
|
#include <StaticAttribute.h>
Public Member Functions | |
StaticAttribute (const string &strName, const string &strDescription, tref defaultValue, Range *pRange=null) | |
~StaticAttribute () | |
tref | getDefaultValue () const |
const Range * | getRangePtr () const |
bool | hasRange () const |
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 static attribute.
This class uses templates. Specialized classes are prepared for bool, int, long, float, double, string, Vec2, Vec3, Vec4, Matrix and Quat data types. No other specializations should be used. Specialized classes are listed below this class.
dataType | data type identificator |
tval | data type used to store values |
tref | data type used for passing arguments and results |
|
inline |
Constructs a StaticAttribute object.
Any pointers passed to this constructor as parameters are used directly, no copy is made. You have to ensure a unique pointer is passed per each call of this constructor. Also ensure that the pointer is used only wihtin the context of this constructor and nowhere else and stays valid all the time. Allocated memory is freed automatically.
strName | reference to a constant attribute name |
strDescription | reference to a constant attribute description |
defaultValue | attribute default value |
pRange | pointer to a Range object on the heap or null if no range is used |
|
inline |
Performs cleanup before object destruction.
|
inline |
Returns attribute default value.
|
inline |
Returns attribute range.
|
inline |
"Has range" predicate.