40 virtual const std::string&
type()
const = 0;
77 virtual const void*
raw()
const = 0;
103 virtual const std::string&
type()
const override;
121 bool set(
const T& newValue);
141 static const std::string&
Type();
149 virtual const void*
raw()
const override;
virtual ~DtAttributeData()
Virtual destructor.
Definition attribute_data.h:36
virtual const void * raw() const =0
Gets a raw pointer to the attribute data.
virtual const std::string & type() const =0
Gets the type name of this attribute data.
const DtAttributeDataType< T > & as() const
Casts this attribute data to a specific type (const version)
Definition attribute_data.h:61
virtual bool setFromString(const std::string &newValue)=0
Sets the attribute value from a string.
DtAttributeData()
Default constructor.
Definition attribute_data.h:33
DtAttributeDataType< T > & as()
Casts this attribute data to a specific type.
Definition attribute_data.h:51
virtual std::string getAsString() const =0
Gets the attribute value as a string.
virtual std::size_t typeHash() const =0
Gets a hash of the type for faster comparisons.
Template for type-specific attribute data storage.
Definition attribute_data.h:87
T & prevData()
Gets a reference to the previous value for modification.
friend class DtAttribute
Allow DtAttribute direct access to internals.
Definition attribute_data.h:153
virtual std::size_t typeHash() const override
Gets a hash of the type for faster comparisons.
static const std::string & Type()
Gets the static type name for this attribute type.
DtAttributeDataType()
Default constructor.
Definition attribute_data.h:92
virtual bool setFromString(const std::string &newValue) override
Sets the attribute value from a string.
virtual ~DtAttributeDataType() override
Virtual destructor.
Definition attribute_data.h:99
static std::size_t TypeHash()
Gets the static type hash for this attribute type.
virtual const std::string & type() const override
Gets the type name of this attribute data.
bool verifyType() const
Verifies that this attribute is of the expected type.
unsigned char myVi
Index indicating which value is current (0 or 1)
Definition attribute_data.h:171
T & data()
Gets a reference to the current value for modification.
const T & get() const
Gets the current value of the attribute.
T myValue[2]
Array storing current and previous values.
Definition attribute_data.h:166
bool set(const T &newValue)
Sets a new value for the attribute.
virtual std::string getAsString() const override
Gets the attribute value as a string.
const T & previousValue() const
Gets the previous value of the attribute.
virtual const void * raw() const override
Gets a raw pointer to the attribute data.
Defines export macros for the VREngage Utility library.
#define UTIL_DLL
Export/import macro for non-Windows platforms.
Definition export.h:39
Include export definitions for this library.
Definition glsVreMessageUtil.h:49