The Nebula Device 3: Attr::AttrId Class Reference

The Nebula Device 3

Attr::AttrId Class Reference

#include <attrid.h>

Inheritance diagram for Attr::AttrId:

Attr::BlobAttrId Attr::BoolAttrId Attr::Float4AttrId Attr::FloatAttrId Attr::GuidAttrId Attr::IntAttrId Attr::Matrix44AttrId Attr::StringAttrId


Detailed Description

An attribute ID is used to carry attribute types (no values) around. Attribute IDs are compile-time safe, since each attribute ID represents its own C++ type.

(C) 2006 Radon Labs GmbH

Public Member Functions

 AttrId ()
 default constructor
 AttrId (const AttrId &rhs)
 copy constructor
 AttrId (const AttributeDefinitionBase &def)
 construct from attribute definition class
 AttrId (const AttributeDefinitionBase *ptr)
 construct from pointer to definition class
 AttrId (const Util::String &name)
 construct from attribute name
 AttrId (const Util::FourCC &fcc)
 construct from attribute fourcc code
bool operator== (const AttrId &rhs) const
 equality operator
bool operator!= (const AttrId &rhs) const
 inequality operator
bool operator> (const AttrId &rhs) const
 greater operator
bool operator>= (const AttrId &rhs) const
 greater-or-equal operator
bool operator< (const AttrId &rhs) const
 lesser operator
bool operator<= (const AttrId &rhs) const
 lesser-or-equal operator
const Util::StringGetName () const
 get attribute name
const Util::FourCCGetFourCC () const
 get fourcc code
AccessMode GetAccessMode () const
 get access type
ValueType GetValueType () const
 get value type
bool IsDynamic () const
 return true if this attribute was dynamically registered
bool IsValid () const
 return true if the attribute id object is valid
bool GetBoolDefValue () const
 get bool default value
int GetIntDefValue () const
 get int default value
float GetFloatDefValue () const
 get floar default value
const Util::StringGetStringDefValue () const
 get string default value
Math::float4 GetFloat4DefValue () const
 get float4 default value
const Math::matrix44GetMatrix44DefValue () const
 get matrix44 default value
const Util::BlobGetBlobDefValue () const
 get blob default value
const Util::GuidGetGuidDefValue () const
 get guid default value

Static Public Member Functions

static bool IsValidName (const Util::String &n)
 return true if the provided attribute id name is valid
static bool IsValidFourCC (const Util::FourCC &fcc)
 return true if the provided attribute id fourcc is valid
static
Util::FixedArray
< AttrId
GetAllAttrIds ()
 return all attribute id's (slow!)

Member Function Documentation

Util::FixedArray< AttrId > Attr::AttrId::GetAllAttrIds (  )  [static]

return all attribute id's (slow!)

Returns an array with all existing attribute ids. This is a slow method.