The Nebula Device 3: Attr::AttributeDefinition< VALUETYPE, TYPE > Class Template Reference

The Nebula Device 3

Attr::AttributeDefinition< VALUETYPE, TYPE > Class Template Reference

#include <attributedefinition.h>

Inheritance diagram for Attr::AttributeDefinition< VALUETYPE, TYPE >:

< VALUETYPE, TYPE >_map" border="0" alt="">
< VALUETYPE, TYPE >_map"> Attr::AttributeDefinitionBase


Detailed Description

template<class VALUETYPE, class TYPE>
class Attr::AttributeDefinition< VALUETYPE, TYPE >

This extends the typeless AttributeDefinitionBase class by a typed template class, which adds compiletime-type-safety to attribute definitions.

(C) 2006 Radon Labs GmbH


Public Member Functions

 AttributeDefinition (const Util::String &n, const Util::FourCC &fourCC, AccessMode am, TYPE defVal)
 constructor
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, inherited]

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, inherited]

register a dynamic attribute

This method registers a new dynamic attribut.

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

clear all dynamic attributes

This clears all dynamic attributes.

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

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, inherited]

unregister an attribute definition

Unregister this attribute definition from the registries.