registerFactoryClass

Register a class type that can be created dynamically, using its name.

Class registration should only be done in module constructors. This allow the registration to be thread safe since module constructors are executed in the main thread.

void
registerFactoryClass
(
T
F
)
(
ref F f
,
string name = ""
)
if (
is(T == class) &&
!isAbstractClass!T
)

Parameters

T

A class.

name
Type: string

The name used to register the class. By default the T.stringof is used.

f
Type: F

The class repository, a hashmap of TypeInfo_Class by string.

Meta