111 return this->
attrs[attrId].GetBool();
146 return this->
attrs[attrId].GetFloat();
181 return this->
attrs[attrId].GetInt();
192 return this->
GetInt(attrId);
216 return this->
attrs[attrId].GetString();
251 return this->
attrs[attrId].GetVec4();
286 return this->
attrs[attrId].GetMat4();
321 return this->
attrs[attrId].GetGuid();
356 return this->
attrs[attrId].GetBlob();
An attribute ID is used to carry attribute types (no values) around.
Definition attrid.h:20
A simple container for attributes.
Definition attributecontainer.h:19
const Attribute & GetAttr(const AttrId &attrId) const
get a single attribute
Definition attributecontainer.cc:78
const Util::Dictionary< AttrId, Attribute > & GetAttrs() const
read access to the attribute array
Definition attributecontainer.cc:97
void SetAttr(const Attribute &attr)
set a single attribute, new or existing
Definition attributecontainer.cc:46
void SetInt(const IntAttrId &attrId, int val)
set int value
Definition attributecontainer.h:169
void RemoveAttr(const AttrId &attrId)
remove an attribute
Definition attributecontainer.cc:117
void SetBlob(const BlobAttrId &attrId, const Util::Blob &blob)
set blob value
Definition attributecontainer.h:344
const Util::Guid & GetGuid(const GuidAttrId &attrId) const
get guid value
Definition attributecontainer.h:318
void SetFloat4(const Vec4AttrId &attrId, const Math::vec4 &val)
set float4 value
Definition attributecontainer.h:239
void SetString(const StringAttrId &attrId, const Util::String &val)
set string value
Definition attributecontainer.h:204
Math::vec4 GetVec4(const Vec4AttrId &attrId) const
get float4 value
Definition attributecontainer.h:248
bool GetBool(const BoolAttrId &attrId) const
get bool value
Definition attributecontainer.h:108
bool HasAttr(const AttrId &attrId) const
check if an attribute exists in the container
Definition attributecontainer.cc:33
void SetGuid(const GuidAttrId &attrId, const Util::Guid &guid)
set guid value
Definition attributecontainer.h:309
~AttributeContainer()
destructor
Definition attributecontainer.cc:23
int GetInt(const IntAttrId &attrId) const
get int value
Definition attributecontainer.h:178
void SetMatrix44(const Mat4AttrId &attrId, const Math::mat4 &val)
set matrix44 value
Definition attributecontainer.h:274
const Util::Blob & GetBlob(const BlobAttrId &attrId) const
get blob value
Definition attributecontainer.h:353
void AddAttr(const Attribute &attr)
add a new attribute, faster then SetAttr(), but attribute may not exist!
Definition attributecontainer.cc:67
void Clear()
clear the attribute container
Definition attributecontainer.cc:107
float GetFloat(const FloatAttrId &attrId) const
get float value
Definition attributecontainer.h:143
const Util::String & GetString(const StringAttrId &attrId) const
get string value
Definition attributecontainer.h:213
AttributeContainer()
constructor
Definition attributecontainer.cc:15
void SetFloat(const FloatAttrId &attrId, float val)
set float value
Definition attributecontainer.h:134
const Math::mat4 & GetMat4(const Mat4AttrId &attrId) const
get matrix44 value
Definition attributecontainer.h:283
int FindAttrIndex(const Attr::AttrId &attrId) const
find index for attribute (SLOW!)
Util::Dictionary< Attr::AttrId, Attribute > attrs
Definition attributecontainer.h:92
void SetBool(const BoolAttrId &attrId, bool val)
set bool value
Definition attributecontainer.h:99
A compiletime-typesafe key/value pair.
Definition attribute.h:32
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 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 collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
#define n_assert(exp)
Definition debug.h:50
Definition accessmode.h:13
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