257 case Vec2Type:
return sizeof(float) * 2;
258 case Vec4Type:
return sizeof(float) * 4;
276 n_error(
"AttributeDefinitionBase::GetSizeOfType(): invalid type enum '%d'!", this->
valueType);
Exit handler for the Attr subsystem, cleans up dynamic attribute definitions before shutdown.
Definition attrexithandler.h:19
An attribute ID is used to carry attribute types (no values) around.
Definition attrid.h:20
Implements a universal attribute definition, consisting of an attribute name, attribute fourcc code,...
Definition attributedefinitionbase.h:30
static const AttributeDefinitionBase * FindByName(const Util::String &n)
find by name
Definition attributedefinitionbase.h:166
const uint GetSizeOfType() const
get size of type in bytes
Definition attributedefinitionbase.h:242
const Util::String & GetTypeName() const
get type name
Definition attributedefinitionbase.h:222
Util::Variant defaultValue
Definition attributedefinitionbase.h:143
static void InitializeRegistry()
setup registry if it doesn't exist
Definition attributedefinitionbase.cc:515
Util::FourCC fourCC
Definition attributedefinitionbase.h:141
static Util::Dictionary< Util::FourCC, const AttributeDefinitionBase * > * FourCCRegistry
Definition attributedefinitionbase.h:150
static void ClearDynamicAttributes()
clear all dynamic attributes
Definition attributedefinitionbase.cc:687
AccessMode GetAccessMode() const
get access type
Definition attributedefinitionbase.h:296
bool isDynamic
Definition attributedefinitionbase.h:145
bool IsDynamic() const
return true if this is a dynamic attribute
Definition attributedefinitionbase.h:306
Util::String name
Definition attributedefinitionbase.h:139
const Util::Variant & GetDefaultValue() const
get default value
Definition attributedefinitionbase.h:232
AccessMode accessMode
Definition attributedefinitionbase.h:142
static const AttributeDefinitionBase * FindByFourCC(const Util::FourCC &fcc)
find by FourCC
Definition attributedefinitionbase.h:184
static void RegisterDynamicAttribute(const Util::String &name, const Util::String &typeName, const Util::FourCC &fourCC, ValueType valueType, AccessMode accessMode)
register a dynamic attribute
Definition attributedefinitionbase.cc:612
static void CheckCreateDynamicAttributesArray()
check if dynamic attribute array exists and create on demand
Definition attributedefinitionbase.cc:527
static void CheckCreateNameRegistry()
check if name registry exists and create on demand
Definition attributedefinitionbase.cc:491
static void Destroy()
static destruction method - call to cleanup the registry hashtable
Definition attributedefinitionbase.cc:585
Util::String typeName
Definition attributedefinitionbase.h:140
const Util::String & GetName() const
get attribute name
Definition attributedefinitionbase.h:202
~AttributeDefinitionBase()
destructor
Definition attributedefinitionbase.cc:481
ValueType GetValueType() const
get value type
Definition attributedefinitionbase.h:286
static Util::Array< const AttributeDefinitionBase * > * DynamicAttributes
Definition attributedefinitionbase.h:151
static AttrExitHandler attrExitHandler
Definition attributedefinitionbase.h:148
static void CheckCreateFourCCRegistry()
check if fourcc registry exists and create on demand
Definition attributedefinitionbase.cc:503
static Util::HashTable< Util::String, const AttributeDefinitionBase * > * NameRegistry
Definition attributedefinitionbase.h:149
void Register()
register an attribute definition
Definition attributedefinitionbase.cc:543
const Util::FourCC & GetFourCC() const
get fourcc code
Definition attributedefinitionbase.h:212
const Attr::ValueType valueType
Definition attributedefinitionbase.h:144
AttributeDefinitionBase()
default constructor is private
Definition attributedefinitionbase.cc:20
Nebula's dynamic array class.
Definition array.h:60
The Util::Blob class encapsulates a chunk of raw memory into a C++ object which can be copied,...
Definition blob.h:22
A collection of key/value pairs with quick value retrieval by key at roughly O(log n).
Definition dictionary.h:34
A four-character-code is a quasi-human-readable 32-bit-id.
Definition fourcc.h:19
Organizes key/value pairs by a hash code.
Definition hashtable.h:42
An "any type" variable.
Definition variant.h:31
Type GetType() const
get type
Definition variant.h:1172
void __cdecl n_error(const char *msg,...)
This function is called when a serious situation is encountered which requires abortion of the applic...
Definition debug.cc:138
#define n_assert(exp)
Definition debug.h:50
Definition accessmode.h:13
ValueType
Definition valuetype.h:20
@ UInt64Type
Definition valuetype.h:28
@ Vec4Type
Definition valuetype.h:33
@ Vec2Type
Definition valuetype.h:32
@ IntType
Definition valuetype.h:25
@ GuidArrayType
Definition valuetype.h:49
@ QuaternionType
Definition valuetype.h:34
@ FloatType
Definition valuetype.h:29
@ BoolArrayType
Definition valuetype.h:43
@ Transform44Type
Definition valuetype.h:37
@ ByteType
Definition valuetype.h:22
@ Mat4Type
Definition valuetype.h:36
@ UShortType
Definition valuetype.h:24
@ BoolType
Definition valuetype.h:31
@ Vec4ArrayType
Definition valuetype.h:45
@ DoubleType
Definition valuetype.h:30
@ StringArrayType
Definition valuetype.h:46
@ Int64Type
Definition valuetype.h:27
@ IntArrayType
Definition valuetype.h:41
@ StringType
Definition valuetype.h:35
@ ShortType
Definition valuetype.h:23
@ FloatArrayType
Definition valuetype.h:42
@ Vec2ArrayType
Definition valuetype.h:44
@ Mat4ArrayType
Definition valuetype.h:47
@ BlobArrayType
Definition valuetype.h:48
@ BlobType
Definition valuetype.h:38
@ VoidPtrType
Definition valuetype.h:40
@ UIntType
Definition valuetype.h:26
@ VoidType
Definition valuetype.h:21
@ GuidType
Definition valuetype.h:39
AccessMode
Definition accessmode.h:15
A 4x4 single point precision float matrix.
Definition mat4.h:49
A quaternion is usually used to represent an orientation in 3D space.
Definition quat.h:30
A 2-component float vector class.
Definition vec2.h:21
A 4D vector.
Definition vec4.h:24
Nebula's universal string class.
Definition string.h:50
uint8_t uint8
Definition types.h:42
unsigned int uint
Definition types.h:31
unsigned short ushort
Definition types.h:32
uint64_t uint64
Definition types.h:36
uint16_t uint16
Definition types.h:40
uint32_t uint32
Definition types.h:38
Defines the valid attribute value types as enum.