PTLib
Version 2.14.3
|
Base class for generic factories. More...
#include <pfactory.h>
Classes | |
class | FactoryMap |
Public Member Functions | |
virtual | ~PFactoryBase () |
virtual void | DestroySingletons ()=0 |
Static Public Member Functions | |
static FactoryMap & | GetFactories () |
Protected Member Functions | |
PFactoryBase () | |
Static Protected Member Functions | |
static PFactoryBase & | InternalGetFactory (const std::string &className, PFactoryBase *(*createFactory)()) |
template<class TheFactory > | |
static PFactoryBase * | CreateFactory () |
template<class TheFactory > | |
static TheFactory & | GetFactoryAs () |
Protected Attributes | |
PMutex | m_mutex |
Base class for generic factories.
This classes reason for existance and the FactoryMap contained within it is to resolve issues with static global construction order and Windows DLL multiple instances issues. THis mechanism guarantees that the one and one only global variable (inside the GetFactories() function) is initialised before any other factory related instances of classes.
|
inlineprotected |
|
inlinevirtual |
|
inlinestaticprotected |
|
pure virtual |
|
static |
|
inlinestaticprotected |
References InternalGetFactory().
|
staticprotected |
Referenced by GetFactoryAs().
|
protected |
Referenced by PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalCreateInstance(), PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalDestroy(), PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalGetKeyList(), PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalIsRegistered(), PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalIsSingleton(), PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalRegister(), PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalRegisterAs(), PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalUnregister(), and PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::InternalUnregisterAll().