List of all members | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Static Private Attributes
utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy > Class Template Reference

Class for the automatic registration of an object. More...

#include "utl/ObjectRegistrar.h"

Inheritance diagram for utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >:
Inheritance graph
[legend]

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 ObjectRegistrarAutoRegister ()
 

Static Private Attributes

static const ObjectRegistrarfgAutoRegistrar
 

Detailed Description

template<class ObjectType, class ObjFactoryType, class CreatorPolicy = StandardCreator<ObjectType, ObjFactoryType>>
class utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >

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.

Author
Lukas Nellen
Date
12 Mar 2004

Definition at line 69 of file ObjectRegistrar.h.

Member Typedef Documentation

template<class ObjectType, class ObjFactoryType, class CreatorPolicy = StandardCreator<ObjectType, ObjFactoryType>>
typedef ObjFactoryType utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >::ObjectFactoryType

The type of the ObjectFactory we register with.

Definition at line 73 of file ObjectRegistrar.h.

template<class ObjectType, class ObjFactoryType, class CreatorPolicy = StandardCreator<ObjectType, ObjFactoryType>>
typedef ObjFactoryType::ObjectPtrType utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >::ObjectPtrType

Definition at line 74 of file ObjectRegistrar.h.

Constructor & Destructor Documentation

template<class ObjectType, class ObjFactoryType, class CreatorPolicy = StandardCreator<ObjectType, ObjFactoryType>>
utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >::ObjectRegistrar ( )
inline
template<class ObjectType, class ObjFactoryType, class CreatorPolicy = StandardCreator<ObjectType, ObjFactoryType>>
utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >::ObjectRegistrar ( bool  )
inlineprivate

Definition at line 88 of file ObjectRegistrar.h.

Member Function Documentation

template<class ObjectType, class ObjFactoryType, class CreatorPolicy = StandardCreator<ObjectType, ObjFactoryType>>
static ObjectRegistrar* utl::ObjectRegistrar< ObjectType, ObjFactoryType, CreatorPolicy >::AutoRegister ( )
inlinestaticprivate

Definition at line 92 of file ObjectRegistrar.h.

Member Data Documentation

template<class ObjectType, class ObjFactoryType, class CreatorPolicy = StandardCreator<ObjectType, ObjFactoryType>>
const ObjectRegistrar< Object, ObjectFactory, CreatorPolicy > * utl::ObjectRegistrar< Object, ObjectFactory, CreatorPolicy >::fgAutoRegistrar
staticprivate

The documentation for this class was generated from the following file:

, generated on Tue Sep 26 2023.