#include <ObjectFactory.h>
Public Types | |
typedef Interface *(* | Creator) () |
Type of object creator. | |
typedef TId | Id |
Type of object type identifier. | |
typedef ObjectFactory< Id, Interface > | InstanceType |
Type of object factory instance. | |
typedef TInterface | Interface |
Type of object base class. | |
Public Member Functions | |
Interface * | New (Id type_id) const |
Interface * | New (const char *type_name) const |
bool | Register (Id type_id, const char *type_name, Creator creator) |
Protected Member Functions | |
ObjectFactory () | |
Constructor. | |
ObjectFactory (const ObjectFactory &) | |
Copy constructor. Intentionally not implemented. | |
void | operator= (const ObjectFactory &) |
Assignment operator. Intentionally not implemented. | |
virtual | ~ObjectFactory () |
Destructor. | |
Constructs a new instance of a class derived from the template type given a type identification such as an enumeration value or string
Definition at line 41 of file ObjectFactory.h.
|
inline |
Create new object
[in] | type_id | Object type identifier. |
Definition at line 115 of file ObjectFactory.h.
|
inline |
Create new object
[in] | type_name | Object type name. |
Definition at line 126 of file ObjectFactory.h.
|
inline |
Register new object creator
[in] | type_id | Object type identifier. |
[in] | type_name | Object type name. |
[in] | creator | Object creator function. |
Definition at line 100 of file ObjectFactory.h.