modules.engineTypes#

class modules.engineTypes.EngineTypes#

Bases: object

class Meta(_class, attachable)#

Bases: object

Structure that hold meta data per engine type, name and class reference

__init__(_class, attachable)#
getAttachables() list#
static get_engine_type(t: type) Meta#

Get the engine type meta

Parameters:

t (type) – The type of a variable, e.g., type(variable)

Returns:

Meta object if t is a registered engine type, None if not

Return type:

Meta

is_attachable() bool#
static is_engine_type(t: type) bool#

Check wheter a type is registered as engine type

Parameters:

t (type) – The type of a variable, e.g., type(variable)

Returns:

True if t is a registered engine type

Return type:

bool

static is_primitive_type(t: type) bool#

Wheter a type is a primitive type.

Parameters:

t (type) – Type to check

Returns:

True if t is int, float, bool, or str

Return type:

bool

static registry()#

Singleton registry of the exportable engine types and engine attachables.

_registry is stored as a class variable, meaniung:

  • initialized only once per Python process

  • shared across all imports and all scripts

Returns:

Map of engine type classes to Meta

Return type:

dict