Class for the automatic registration of an object. More...
#include "utl/ObjectRegistrar.h"
Public Types | |
typedef ObjFactoryType | ObjectFactoryType |
The type of the ObjectFactory we register with. More... | |
typedef ObjFactoryType::ObjectPtrType | ObjectPtrType |
Public Member Functions | |
ObjectRegistrar () | |
Private Member Functions | |
ObjectRegistrar (bool) | |
Static Private Member Functions | |
static ObjectRegistrar * | AutoRegister () |
Static Private Attributes | |
static const ObjectRegistrar * | fgAutoRegistrar |
Class for the automatic registration of an object.
This class can be used as a mix-in with private inheritance or by instantiating it in a (private) member variable.
The object is registerd in an ObjectFactory of the appropriate type.
For a class to be registrable, it has to provide the following static function:
GetRegisteredId()
to return the identifier under which the type is registered in the ObjectFactory
.
When using the default CPolicy
, the class also has to provide a static Create()
function that creates the class with the default constructor.
Definition at line 69 of file ObjectRegistrar.h.
typedef ObjFactoryType utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >::ObjectFactoryType |
The type of the ObjectFactory we register with.
Definition at line 73 of file ObjectRegistrar.h.
typedef ObjFactoryType::ObjectPtrType utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >::ObjectPtrType |
Definition at line 74 of file ObjectRegistrar.h.
|
inline |
Definition at line 79 of file ObjectRegistrar.h.
Referenced by utl::ObjectRegistrar< tst::ExternalObject< id >, utl::ObjectFactory >::AutoRegister(), and utl::ObjectRegistrar< tst::ExternalObject< id >, utl::ObjectFactory >::ObjectRegistrar().
|
inlineprivate |
Definition at line 88 of file ObjectRegistrar.h.
|
inlinestaticprivate |
Definition at line 92 of file ObjectRegistrar.h.
|
staticprivate |
Definition at line 99 of file ObjectRegistrar.h.
Referenced by utl::ObjectRegistrar< tst::ExternalObject< id >, utl::ObjectFactory >::ObjectRegistrar().