TypeRegistry

A type registry that stores mappings between name and numeric IDs and their classes.

Members

Aliases

ArgsT
alias ArgsT = Args

Arguments

Functions

create
T create(string sid, Args args)

Creates an instance of a type registered within the registry.

create
T create(uint nid, Args args)

Creates an instance of a type registered within the registry.

has
bool has(string sid)

Gets whether the type registry has a given string ID registered within it.

has
bool has(uint nid)

Gets whether the type registry has a given numeric ID registered within it.

lookup
TypeId lookup(T object)

Looks up a type within the type registry.

lookup
TypeId lookup(TypeInfo object)

Looks up a type within the type registry.

opApply
int opApply(int delegate(TypeId) dg)

Allows iterating over the registry.

register
void register()

Registers the given type in the type registry.

tryCreateFrom
T tryCreateFrom(DataNode object, Args args)

Tries to create a type from the registry based on a DataNode. The DataNode must have a field called type.

Properties

alignment
size_t alignment [@property getter]

The alignment needed to store registered objects in sequential memory.

Meta