Nebula
Loading...
Searching...
No Matches
Attr::AttributeDefinition< VALUETYPE, TYPE > Class Template Reference

#include <attributedefinition.h>

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.

Inherits Attr::AttributeDefinitionBase.

Public Types

using AttrDeclType = TYPE
 Inner type.
 

Public Member Functions

 AttributeDefinition (const Util::String &n, const Util::String &tn, const Util::FourCC &fourCC, AccessMode am, TYPE defVal)
 constructor
 
- Public Member Functions inherited from Attr::AttributeDefinitionBase
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, bool isDynamic)
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const byte &defVal, bool isDynamic)
 Constructor with default byte value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const short &defVal, bool isDynamic)
 Constructor with default short value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const ushort &defVal, bool isDynamic)
 Constructor with default ushort value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const int &defVal, bool isDynamic)
 Constructor with default int value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const uint &defVal, bool isDynamic)
 Constructor with default uint value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const int64_t &defVal, bool isDynamic)
 Constructor with default int64 value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const uint64_t &defVal, bool isDynamic)
 Constructor with default uint64 value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const float &defVal, bool isDynamic)
 Constructor with default float value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const double &defVal, bool isDynamic)
 Constructor with default double value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const bool &defVal, bool isDynamic)
 Constructor with default bool value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Math::vec2 &defVal, bool isDynamic)
 Constructor with default float2 value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Math::vec4 &defVal, bool isDynamic)
 Constructor with default float4 value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Math::quat &defVal, bool isDynamic)
 Constructor with default quaternion value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::String &defVal, bool isDynamic)
 Constructor with default string value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Math::mat4 &defVal, bool isDynamic)
 Constructor with default mat4 value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Math::transform44 &defVal, bool isDynamic)
 Constructor with default transform44 value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Blob &defVal, bool isDynamic)
 Constructor with default blob value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Guid &defVal, bool isDynamic)
 Constructor with default guid value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, void *defVal, bool isDynamic)
 Constructor with default void pointer value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< int > &defVal, bool isDynamic)
 Constructor with default int array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< float > &defVal, bool isDynamic)
 Constructor with default float array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< bool > &defVal, bool isDynamic)
 Constructor with default bool array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< Math::vec2 > &defVal, bool isDynamic)
 Constructor with default float2 array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< Math::vec4 > &defVal, bool isDynamic)
 Constructor with default float4 array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< Util::String > &defVal, bool isDynamic)
 Constructor with default string array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< Math::mat4 > &defVal, bool isDynamic)
 Constructor with default mat4 array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< Util::Blob > &defVal, bool isDynamic)
 Constructor with default blob array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Array< Util::Guid > &defVal, bool isDynamic)
 Constructor with default guid array value.
 
 AttributeDefinitionBase (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, AccessMode accessMode, const Util::Variant &defVal, ValueType type, bool isDynamic)
 Constructor with default variant value.
 
 ~AttributeDefinitionBase ()
 destructor
 
bool IsDynamic () const
 return true if this is a dynamic attribute
 
const Util::StringGetName () const
 get attribute name
 
const Util::FourCCGetFourCC () const
 get fourcc code
 
const Util::StringGetTypeName () const
 get type name
 
const Util::VariantGetDefaultValue () const
 get default value
 
const uint GetSizeOfType () const
 get size of type in bytes
 
AccessMode GetAccessMode () const
 get access type
 
ValueType GetValueType () const
 get value type
 

Additional Inherited Members

- Static Public Member Functions inherited from Attr::AttributeDefinitionBase
static void Destroy ()
 static destruction method - call to cleanup the registry hashtable
 
static const AttributeDefinitionBaseFindByName (const Util::String &n)
 find by name
 
static const AttributeDefinitionBaseFindByFourCC (const Util::FourCC &fcc)
 find by FourCC
 
static void RegisterDynamicAttribute (const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, ValueType valueType, AccessMode accessMode)
 register a dynamic attribute
 
static void ClearDynamicAttributes ()
 clear all dynamic attributes
 
static void InitializeRegistry ()
 setup registry if it doesn't exist
 
- Protected Member Functions inherited from Attr::AttributeDefinitionBase
void Register ()
 register an attribute definition
 

Member Typedef Documentation

◆ AttrDeclType

template<class VALUETYPE , class TYPE >
using Attr::AttributeDefinition< VALUETYPE, TYPE >::AttrDeclType = TYPE

Inner type.

Constructor & Destructor Documentation

◆ AttributeDefinition()

template<class VALUETYPE , class TYPE >
Attr::AttributeDefinition< VALUETYPE, TYPE >::AttributeDefinition ( const Util::String & n,
const Util::String & tn,
const Util::FourCC & fourCC,
AccessMode am,
TYPE defVal )

constructor


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