The Nebula Device 3: Attr::AttributeDefinitionBase Class Reference

The Nebula Device 3

Attr::AttributeDefinitionBase Class Reference

#include <attributedefinitionbase.h>

Inheritance diagram for Attr::AttributeDefinitionBase:

Attr::AttributeDefinition< VALUETYPE, TYPE >< VALUETYPE, TYPE >" shape="rect" coords="0,56,276,80">


Detailed Description

Implemnts a universal attribute definition, consisting of an attribute name, attribute fourcc code, value type and access type.

(C) 2006 Radon Labs GmbH

Public Member Functions

 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, bool isDynamic)
 constructor
 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, bool defVal, bool isDynamic)
 bool constructor
 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, int defVal, bool isDynamic)
 int constructor
 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, float defVal, bool isDynamic)
 float constructor
 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, const Util::String &defVal, bool isDynamic)
 string constructor
 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, const Math::float4 &defVal, bool isDynamic)
 float4 constructor
 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, const Math::matrix44 &defVal, bool isDynamic)
 matrix44 constructor
 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Blob &defVal, bool isDynamic)
 blob constructor
 AttributeDefinitionBase (const Util::String &name, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Guid &defVal, bool isDynamic)
 guid constructor
 ~AttributeDefinitionBase ()
 destructor
const Util::StringGetName () const
 get attribute name
const Util::FourCCGetFourCC () const
 get fourcc code
bool IsDynamic () const
 return true if this is a dynamic attribute
const Util::VariantGetDefaultValue () const
 get default value
AccessMode GetAccessMode () const
 get access type
ValueType GetValueType () const
 get value type

Static Public Member Functions

static void Destroy ()
 static destruction method - call to cleanup the registry hashtable
static const
AttributeDefinitionBase
FindByName (const Util::String &n)
 find by name
static const
AttributeDefinitionBase
FindByFourCC (const Util::FourCC &fcc)
 find by FourCC
static void RegisterDynamicAttribute (const Util::String &name, const Util::FourCC &fourCC, ValueType valueType, AccessMode accessMode)
 register a dynamic attribute
static void ClearDynamicAttributes ()
 clear all dynamic attributes

Protected Member Functions

void Register ()
 register an attribute definition
void Unregister ()
 unregister an attribute definition


Member Function Documentation

void Attr::AttributeDefinitionBase::Destroy (  )  [static]

static destruction method - call to cleanup the registry hashtable

Cleanup the name registry!

void Attr::AttributeDefinitionBase::RegisterDynamicAttribute ( const Util::String name,
const Util::FourCC fourCC,
Attr::ValueType  valueType,
Attr::AccessMode  accessMode 
) [static]

register a dynamic attribute

This method registers a new dynamic attribut.

void Attr::AttributeDefinitionBase::ClearDynamicAttributes (  )  [static]

clear all dynamic attributes

This clears all dynamic attributes.

void Attr::AttributeDefinitionBase::Register (  )  [protected]

register an attribute definition

Register this static attribute definition in the name and fourcc registries. Since the order of initialization is not defined for static objects we need to use pointers and creation-on-demand for the registry objects.

void Attr::AttributeDefinitionBase::Unregister (  )  [protected]

unregister an attribute definition

Unregister this attribute definition from the registries.