330 return this->
keyData.GetName();
339 return this->
keyData.GetFourCC();
348 return this->
keyData.GetValueType();
357 return this->
keyData.GetAccessMode();
818 this->
valueData = Util::Guid::FromString(str);
822 n_error(
"Attribute::SetValueFromString(): cannot convert string to attribute type!");
862 str = this->
GetGuid().AsString();
866 n_error(
"Attribute: Cannot convert blob to string (attrid='%s')!", this->
GetName().AsCharPtr());
870 n_error(
"Attribute: Cannot convert void attribute to string (attrid='%s')!", this->
GetName().AsCharPtr());
872 default:
n_error(
"Attribute: unhandled enum");
break;
An attribute ID is used to carry attribute types (no values) around.
Definition attrid.h:20
A compiletime-typesafe key/value pair.
Definition attribute.h:32
bool GetBool() const
get bool content
Definition attribute.h:610
void SetVec4(const Math::vec4 &val)
set float4 value
Definition attribute.h:725
void operator=(const Attribute &rhs)
assignment operator
Definition attribute.h:373
const AttrId & GetAttrId() const
get attribute id
Definition attribute.h:319
AccessMode GetAccessMode() const
get access mode of attribute
Definition attribute.h:355
void SetBool(bool val)
set bool content
Definition attribute.h:599
const Util::String & GetName() const
get name of attribute
Definition attribute.h:328
bool operator==(const Attribute &rhs) const
equality operator
Definition attribute.h:471
const Util::Blob & GetBlob() const
get blob value
Definition attribute.h:778
uint GetUInt() const
get int content
Definition attribute.h:652
void Clear()
clear the attribute's value
Definition attribute.h:364
Math::vec4 GetVec4() const
get float4 value
Definition attribute.h:736
Attribute()
default constructor
Definition attribute.h:181
static ValueType StringToValueType(const Util::String &s)
convert string to type
Definition attribute.h:881
const Util::String & GetString() const
get string content
Definition attribute.h:694
void SetValue(const Util::Variant &val)
set generic value
Definition attribute.h:899
void SetUInt(uint val)
set int content
Definition attribute.h:641
void SetAttrId(const AttrId &id)
set attribute id
Definition attribute.h:310
void SetString(const Util::String &val)
set string content
Definition attribute.h:683
Util::String ValueAsString() const
convert the content to a string
Definition attribute.h:831
void SetGuid(const Util::Guid &val)
set guid value
Definition attribute.h:746
void SetFloat(float val)
set float content
Definition attribute.h:662
void SetMat4(const Math::mat4 &val)
set matrix44 value
Definition attribute.h:704
void SetValueFromString(const Util::String &str)
set value from string (convert as necessary)
Definition attribute.h:788
float GetFloat() const
get float content
Definition attribute.h:673
ValueType GetValueType() const
get value type of attribute
Definition attribute.h:346
const Util::Variant & GetValue() const
get generic value
Definition attribute.h:908
const Util::FourCC & GetFourCC() const
get fourcc of attribute
Definition attribute.h:337
bool operator!=(const Attribute &rhs) const
equality operator
Definition attribute.h:540
void SetInt(int val)
set int content
Definition attribute.h:620
const Math::mat4 & GetMat4() const
get matrix44 value
Definition attribute.h:715
bool operator!=(bool rhs) const
bool equality operator
static Util::String ValueTypeToString(ValueType t)
convert type to string
Definition attribute.h:890
int GetInt() const
get int content
Definition attribute.h:631
void SetBlob(const Util::Blob &val)
set blob value
Definition attribute.h:767
const Util::Guid & GetGuid() const
get guid value
Definition attribute.h:757
Typed attribute id for blob type.
Definition blobattrid.h:18
Typed attribute id for bool type.
Definition boolattrid.h:18
Typed attribute id for float type.
Definition floatattrid.h:18
Typed attribute id for guid type.
Definition guidattrid.h:18
Typed attribute id for integer type.
Definition intattrid.h:18
Typed attribute id for mat4 type.
Definition mat4attrid.h:18
Typed attribute id for string type.
Definition stringattrid.h:18
Typed attribute id for unsigned integer type.
Definition uintattrid.h:18
Typed attribute id for vec4 type.
Definition vec4attrid.h:18
The Util::Blob class encapsulates a chunk of raw memory into a C++ object which can be copied,...
Definition blob.h:22
A four-character-code is a quasi-human-readable 32-bit-id.
Definition fourcc.h:19
Key/Value pair objects are used by most assiociative container classes, like Dictionary or HashTable.
Definition keyvaluepair.h:19
AttrId keyData
Definition keyvaluepair.h:66
Util::Variant valueData
Definition keyvaluepair.h:67
An "any type" variable.
Definition variant.h:31
const Math::mat4 & GetMat4() const
get mat4 content
Definition variant.h:2642
Type
variant types
Definition variant.h:35
Math::vec4 GetVec4() const
get vec4 content
Definition variant.h:2604
int GetInt() const
get integer content
Definition variant.h:2422
const Util::String & GetString() const
get string content
Definition variant.h:2548
uint GetUInt() const
get unsigned integer content
Definition variant.h:2432
bool GetBool() const
get bool content
Definition variant.h:2529
void Clear()
clear content, resets type to void
Definition variant.h:610
const Util::Guid & GetGuid() const
get guid content
Definition variant.h:2680
float GetFloat() const
get float content
Definition variant.h:2491
static Type StringToType(const Util::String &str)
convert string to type
Definition variant.h:3504
const Util::Blob & GetBlob() const
get blob
Definition variant.h:2699
static Util::String TypeToString(Type t)
convert type to string
Definition variant.h:3460
void __cdecl n_error(const char *msg,...)
This function is called when a serious situation is encountered which requires abortion of the applic...
Definition debug.cc:138
#define n_assert(exp)
Definition debug.h:50
Definition accessmode.h:13
ValueType
Definition valuetype.h:20
@ Vec4Type
Definition valuetype.h:33
@ IntType
Definition valuetype.h:25
@ FloatType
Definition valuetype.h:29
@ Mat4Type
Definition valuetype.h:36
@ BoolType
Definition valuetype.h:31
@ StringType
Definition valuetype.h:35
@ BlobType
Definition valuetype.h:38
@ UIntType
Definition valuetype.h:26
@ VoidType
Definition valuetype.h:21
@ GuidType
Definition valuetype.h:39
AccessMode
Definition accessmode.h:15
@ ReadWrite
Definition accessmode.h:17
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
A 4x4 single point precision float matrix.
Definition mat4.h:49
A 4D vector.
Definition vec4.h:24
Nebula's universal string class.
Definition string.h:50
void SetInt(int val)
set as int value
Definition string.cc:1405
Math::mat4 AsMat4() const
return contents as mat4
Definition string.cc:705
void SetBool(bool val)
set as bool value
Definition string.cc:1468
bool AsBool() const
return contents as bool
Definition string.cc:1072
float AsFloat() const
return contents as float
Definition string.cc:1063
Math::vec4 AsVec4() const
return contents as vec4
Definition string.cc:1672
void SetMat4(const Math::mat4 &v)
set as mat4 value
Definition string.cc:1561
int AsInt() const
return contents as integer
Definition string.cc:1039
void SetVec4(const Math::vec4 &v)
set as vec4 value
Definition string.cc:1516
void SetFloat(float val)
set as float value
Definition string.cc:1450
unsigned int uint
Definition types.h:31