|
VR-Engage
2.2
|
This abstract class provides the interface for type-independent attribute data storage. It allows type-safe access to attribute values through dynamic casting and defines operations common to all attribute types.
#include <attribute_data.h>
Public Member Functions | |
| DtAttributeData () | |
| virtual | ~DtAttributeData () |
| virtual const std::string & | type () const =0 |
| virtual std::size_t | typeHash () const =0 |
| template<typename T> | |
| DtAttributeDataType< T > & | as () |
| template<typename T> | |
| const DtAttributeDataType< T > & | as () const |
| virtual std::string | getAsString () const =0 |
| virtual bool | setFromString (const std::string &newValue)=0 |
| virtual const void * | raw () const =0 |
|
inline |
Default constructor.
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
Gets the type name of this attribute data.
Implemented in makVre::DtAttributeDataType< T >.
|
pure virtual |
Gets a hash of the type for faster comparisons.
Implemented in makVre::DtAttributeDataType< T >.
|
inline |
Casts this attribute data to a specific type.
| T | The type to cast to |
|
inline |
Casts this attribute data to a specific type (const version)
| T | The type to cast to |
|
pure virtual |
Gets the attribute value as a string.
Implemented in makVre::DtAttributeDataType< T >.
|
pure virtual |
Sets the attribute value from a string.
| newValue | String representation of the value to set |
Implemented in makVre::DtAttributeDataType< T >.
|
pure virtual |
Gets a raw pointer to the attribute data.
Implemented in makVre::DtAttributeDataType< T >.