class Creatable
Defined in:
The C4Creation.h
Creatable
class template is the base class for class types that can be extended by application-defined subclasses.
Definition
template <class type, typename param = Unpacker&> class Creatable
Member Functions
Creatable::InstallCreator |
Installs a creator object for application-defined subclasses of the template parameter. |
Creatable::RemoveCreator |
Removes a creator object for application-defined subclasses of the template parameter. |
Template Parameters
type |
The type of the base class of a hierarchy of extensible classes. |
param |
The type of the data passed to the creator callback functions. |
Constructor
Creatable()
Description
The Creatable
class template appears as a base class for types of objects that can have custom subclasses defined by an application. So that the engine can create these custom subclasses when necessary (e.g., when loading a world), an application installs a special creator object by calling the Creatable::InstallCreator
function. This object has a member function that is responsible for returning a pointer to a newly created instance of the subclass of a given type.
See Also