|
PTLib
Version 2.10.11
|
Template class for generic factories of an abstract class. More...
#include <pfactory.h>
Classes | |
| class | Worker |
| class | WorkerBase |
Public Types | |
| typedef KeyType | Key_T |
| typedef AbstractClass | Abstract_T |
| typedef std::map< Key_T, WorkerBase * > | KeyMap_T |
| typedef std::vector< Key_T > | KeyList_T |
Public Member Functions | |
| virtual void | DestroySingletons () |
Static Public Member Functions | |
| static bool | Register (const Key_T &key, WorkerBase *worker) |
| static bool | Register (const Key_T &key, Abstract_T *instance, bool autoDeleteInstance=true) |
| static PBoolean | RegisterAs (const Key_T &newKey, const Key_T &oldKey) |
| static void | Unregister (const Key_T &key) |
| static void | UnregisterAll () |
| static bool | IsRegistered (const Key_T &key) |
| static Abstract_T * | CreateInstance (const Key_T &key) |
| template<class Derived_T > | |
| static Derived_T * | CreateInstanceAs (const Key_T &key) |
| static PBoolean | IsSingleton (const Key_T &key) |
| static KeyList_T | GetKeyList () |
| static KeyMap_T & | GetKeyMap () |
| static PMutex & | GetMutex () |
Protected Member Functions | |
| PFactory () | |
| ~PFactory () | |
| bool | Register_Internal (const Key_T &key, WorkerBase *worker) |
| PBoolean | RegisterAs_Internal (const Key_T &newKey, const Key_T &oldKey) |
| void | Unregister_Internal (const Key_T &key) |
| void | UnregisterAll_Internal () |
| bool | IsRegistered_Internal (const Key_T &key) |
| Abstract_T * | CreateInstance_Internal (const Key_T &key) |
| bool | IsSingleton_Internal (const Key_T &key) |
| KeyList_T | GetKeyList_Internal () |
Static Protected Member Functions | |
| static PFactory & | GetInstance () |
Protected Attributes | |
| KeyMap_T | m_keyMap |
Template class for generic factories of an abstract class.
| typedef AbstractClass PFactory< AbstractClass, KeyType >::Abstract_T |
| typedef KeyType PFactory< AbstractClass, KeyType >::Key_T |
| typedef std::vector<Key_T> PFactory< AbstractClass, KeyType >::KeyList_T |
| typedef std::map<Key_T, WorkerBase *> PFactory< AbstractClass, KeyType >::KeyMap_T |
|
inlineprotected |
|
inlineprotected |
References PFactoryBase::DestroySingletons().
|
inlinestatic |
|
inlineprotected |
References PFactoryBase::m_mutex.
|
inlinestatic |
|
inlinevirtual |
Implements PFactoryBase.
|
inlinestatic |
|
inlineprotected |
References PFactoryBase::m_mutex.
|
inlinestatic |
|
inlinestatic |
|
inlineprotected |
References PFactoryBase::m_mutex.
|
inlinestatic |
|
inlineprotected |
References PFactoryBase::m_mutex.
|
inlinestatic |
|
inlinestatic |
References PNEW.
|
inlineprotected |
References PFactoryBase::m_mutex, and PAssertNULL.
|
inlinestatic |
|
inlineprotected |
References PFactoryBase::m_mutex.
|
inlineprotected |
References PFactoryBase::m_mutex.
|
inlinestatic |
|
inlineprotected |
References PFactoryBase::m_mutex.
|
protected |