EngineTypeInfo

Engine/source/console/engineTypeInfo.h

Information about an engine type.

More...

List Interface

Interface for accessing/traversing the list of types.

Return the next type in the global link chain of types.

Return the first type in the global link chain of types.

Instancing

bool

Create a new instance at the given address.

Destroy the instance at the given address.

Public Friends

Protected Attributes

If this is a function type, this is the pointer to the argument type table.

If this is an enumeration or bitfield type, this is the pointer to the enum table.

If this is a struct type, this is the pointer to the field table.

Size of an instance of this type.

Networking related information for this type.

Next type in the global link chain.

If this is a class type, this is the pointer to the property table.

Pointer to type info object for engine type that this type subtypes from. NULL if none.

Combination of EngineTypeFlags.

Protected Static Attributes

First type in the global link chain of type info instances.

Total number of defined types.

Public Functions

Return the EngineEnumTable for this type (only for enumeration and bitfield types).

Return the EngineFieldTable for this type (only for struct types).

Return the.

Return the EnginePropertyTable for this type (only for class types).

Return the type info object of the engine type that this type subtypes from.

Return the kind this type.

const char *

Return the name of the type.

Return the size of a single value in bytes.

bool

Return true if the type is abstract.

bool

Test whether this type is a bitfield type.

bool

Test whether this is a class type.

bool

Return true if the objects of this type can be disposed by the engine.

bool

Test whether this type is an enumeration type.

bool

Test whether this type is a function type.

bool

Return true if the type can be instantiated from outside the engine.

bool

Test whether this type is a primitive type.

bool

Return true if the type can have only a single instance.

bool

Test whether this type is a struct type.

bool

Return true if this type is a subtype of the given type.

bool

Return true if the type is a variadic function type.

Protected Functions

EngineTypeInfo(const char * typeName, EngineExportScope * scope, EngineTypeKind kind, U32 instanceSize, const char * docString)

Public Static Functions

getTypeInfoByName(const char * typeName)

Get the type info instance for the given type.

Detailed Description

Information about an engine type.

This class is used to store run-time type information about engine types.

Once created, type info objects must persist for the entire duration the engine is running.

All types are implicitly export scopes and may thus contain other exports within them.

List Interface

Interface for accessing/traversing the list of types.

getNextType()

Return the next type in the global link chain of types.

getFirstType()

Return the first type in the global link chain of types.

Instancing

constructInstance(void * ptr)

Create a new instance at the given address.

pre:

Must not be called for abstract types.

Reimplemented by: EngineSimpleTypeInfo, EngineStructTypeInfo, EngineClassTypeInfo

destructInstance(void * ptr)

Destroy the instance at the given address.

pre:

Must not be called for abstract types.

Reimplemented by: EngineSimpleTypeInfo, EngineStructTypeInfo, EngineClassTypeInfo

Public Friends

Protected Attributes

const EngineArgumentTypeTable * mArgumentTypeTable 

If this is a function type, this is the pointer to the argument type table.

const EngineEnumTable * mEnumTable 

If this is an enumeration or bitfield type, this is the pointer to the enum table.

const EngineFieldTable * mFieldTable 

If this is a struct type, this is the pointer to the field table.

U32 mInstanceSize 

Size of an instance of this type.

EngineTypeNetInfo mNetInfo 

Networking related information for this type.

const EngineTypeInfo * mNext 

Next type in the global link chain.

const EnginePropertyTable * mPropertyTable 

If this is a class type, this is the pointer to the property table.

const EngineTypeInfo * mSuperType 

Pointer to type info object for engine type that this type subtypes from. NULL if none.

BitSet32 mTypeFlags 

Combination of EngineTypeFlags.

EngineTypeKind mTypeKind 

Kind of type.

Protected Static Attributes

const EngineTypeInfo * smFirst 

First type in the global link chain of type info instances.

U32 smNumTypes 

Total number of defined types.

Public Functions

DECLARE_CLASS(EngineTypeInfo , EngineExportScope )

getArgumentTypeTable()

getEnumTable()

Return the EngineEnumTable for this type (only for enumeration and bitfield types).

getFieldTable()

Return the EngineFieldTable for this type (only for struct types).

getInstanceSize()

Return the.

getNetInfo()

getPropertyTable()

Return the EnginePropertyTable for this type (only for class types).

getSuperType()

Return the type info object of the engine type that this type subtypes from.

getTypeKind()

Return the kind this type.

getTypeName()

Return the name of the type.

return:

The name of the type or an empty string if this is an anonymous type.

getValueSize()

Return the size of a single value in bytes.

Be aware that the value size refers to the value as it is passed around. For types using reference or pointer value semantics, this is thus the size of a pointer or reference and not the size of the actual instance.

isAbstract()

Return true if the type is abstract.

note:

Only class and function types can be abstract.

isBitfield()

Test whether this type is a bitfield type.

isClass()

Test whether this is a class type.

isDisposable()

Return true if the objects of this type can be disposed by the engine.

isEnum()

Test whether this type is an enumeration type.

isFunction()

Test whether this type is a function type.

isInstantiable()

Return true if the type can be instantiated from outside the engine.

isPrimitive()

Test whether this type is a primitive type.

isSingleton()

Return true if the type can have only a single instance.

isStruct()

Test whether this type is a struct type.

isSubtypeOf(const EngineTypeInfo * type)

Return true if this type is a subtype of the given type.

isVariadic()

Return true if the type is a variadic function type.

Protected Functions

EngineTypeInfo(const char * typeName, EngineExportScope * scope, EngineTypeKind kind, U32 instanceSize, const char * docString)

Public Static Functions

getTypeInfoByName(const char * typeName)

Get the type info instance for the given type.

Parameters:

typeName

Name of a registered engine type.

return:

Type info instance for typeName or NULL if no such type exists.