Nebula
Loading...
Searching...
No Matches
Attr::AttrId Class Reference

#include <attrid.h>

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.

Inherited by Attr::BlobAttrId, Attr::BoolAttrId, Attr::FloatAttrId, Attr::GuidAttrId, Attr::IntAttrId, Attr::Mat4AttrId, Attr::StringAttrId, Attr::UIntAttrId, and Attr::Vec4AttrId.

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::StringGetTypeName () const
 get attribute type 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
 
uint GetSizeOfType () const
 return the byte size of the type
 
bool GetBoolDefValue () const
 get bool default value
 
int GetIntDefValue () const
 get int default value
 
uint GetUIntDefValue () const
 get uint default value
 
float GetFloatDefValue () const
 get floar default value
 
const Util::StringGetStringDefValue () const
 get string default value
 
Math::vec4 GetVec4DefValue () const
 get float4 default value
 
const Math::mat4GetMat4DefValue () const
 get mat4 default value
 
const Util::BlobGetBlobDefValue () const
 get blob default value
 
const Util::GuidGetGuidDefValue () const
 get guid default value
 
const Util::VariantGetDefaultValue () const
 get default value variant
 

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< AttrIdGetAllAttrIds ()
 return all attribute id's (slow!)
 

Protected Attributes

const AttributeDefinitionBasedefPtr
 

Constructor & Destructor Documentation

◆ AttrId() [1/6]

Attr::AttrId::AttrId ( )
inline

default constructor

◆ AttrId() [2/6]

Attr::AttrId::AttrId ( const AttrId & rhs)
inline

copy constructor

◆ AttrId() [3/6]

Attr::AttrId::AttrId ( const AttributeDefinitionBase & def)
inline

construct from attribute definition class

◆ AttrId() [4/6]

Attr::AttrId::AttrId ( const AttributeDefinitionBase * ptr)
inline

construct from pointer to definition class

◆ AttrId() [5/6]

Attr::AttrId::AttrId ( const Util::String & name)
inline

construct from attribute name

◆ AttrId() [6/6]

Attr::AttrId::AttrId ( const Util::FourCC & fcc)
inline

construct from attribute fourcc code

Member Function Documentation

◆ GetAccessMode()

AccessMode Attr::AttrId::GetAccessMode ( ) const
inline

get access type

◆ GetAllAttrIds()

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.

◆ GetBlobDefValue()

const Util::Blob & Attr::AttrId::GetBlobDefValue ( ) const
inline

get blob default value

◆ GetBoolDefValue()

bool Attr::AttrId::GetBoolDefValue ( ) const
inline

get bool default value

◆ GetDefaultValue()

const Util::Variant & Attr::AttrId::GetDefaultValue ( ) const
inline

get default value variant

◆ GetFloatDefValue()

float Attr::AttrId::GetFloatDefValue ( ) const
inline

get floar default value

◆ GetFourCC()

const Util::FourCC & Attr::AttrId::GetFourCC ( ) const
inline

get fourcc code

◆ GetGuidDefValue()

const Util::Guid & Attr::AttrId::GetGuidDefValue ( ) const
inline

get guid default value

◆ GetIntDefValue()

int Attr::AttrId::GetIntDefValue ( ) const
inline

get int default value

◆ GetMat4DefValue()

const Math::mat4 & Attr::AttrId::GetMat4DefValue ( ) const
inline

get mat4 default value

◆ GetName()

const Util::String & Attr::AttrId::GetName ( ) const
inline

get attribute name

◆ GetSizeOfType()

uint Attr::AttrId::GetSizeOfType ( ) const
inline

return the byte size of the type

◆ GetStringDefValue()

const Util::String & Attr::AttrId::GetStringDefValue ( ) const
inline

get string default value

◆ GetTypeName()

const Util::String & Attr::AttrId::GetTypeName ( ) const
inline

get attribute type name

◆ GetUIntDefValue()

uint Attr::AttrId::GetUIntDefValue ( ) const
inline

get uint default value

◆ GetValueType()

ValueType Attr::AttrId::GetValueType ( ) const
inline

get value type

◆ GetVec4DefValue()

Math::vec4 Attr::AttrId::GetVec4DefValue ( ) const
inline

get float4 default value

◆ IsDynamic()

bool Attr::AttrId::IsDynamic ( ) const
inline

return true if this attribute was dynamically registered

◆ IsValid()

bool Attr::AttrId::IsValid ( ) const
inline

return true if the attribute id object is valid

◆ IsValidFourCC()

bool Attr::AttrId::IsValidFourCC ( const Util::FourCC & fcc)
inlinestatic

return true if the provided attribute id fourcc is valid

◆ IsValidName()

bool Attr::AttrId::IsValidName ( const Util::String & n)
inlinestatic

return true if the provided attribute id name is valid

◆ operator!=()

bool Attr::AttrId::operator!= ( const AttrId & rhs) const
inline

inequality operator

◆ operator<()

bool Attr::AttrId::operator< ( const AttrId & rhs) const
inline

lesser operator

◆ operator<=()

bool Attr::AttrId::operator<= ( const AttrId & rhs) const
inline

lesser-or-equal operator

◆ operator==()

bool Attr::AttrId::operator== ( const AttrId & rhs) const
inline

equality operator

◆ operator>()

bool Attr::AttrId::operator> ( const AttrId & rhs) const
inline

greater operator

◆ operator>=()

bool Attr::AttrId::operator>= ( const AttrId & rhs) const
inline

greater-or-equal operator

Member Data Documentation

◆ defPtr

const AttributeDefinitionBase* Attr::AttrId::defPtr
protected

The documentation for this class was generated from the following files: