PTLib
Version 2.10.4
|
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 () |
static PMutex & | GetFactoriesMutex () |
Protected Member Functions | |
PFactoryBase () | |
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.
PFactoryBase::PFactoryBase | ( | ) | [inline, protected] |
virtual PFactoryBase::~PFactoryBase | ( | ) | [inline, virtual] |
virtual void PFactoryBase::DestroySingletons | ( | ) | [pure virtual] |
Implemented in PFactory< AbstractClass, KeyType >.
static FactoryMap& PFactoryBase::GetFactories | ( | ) | [static] |
Referenced by PFactory< AbstractClass, KeyType >::GetInstance().
static PMutex& PFactoryBase::GetFactoriesMutex | ( | ) | [static] |
Referenced by PFactory< AbstractClass, KeyType >::GetInstance().
PMutex PFactoryBase::m_mutex [protected] |
Referenced by PFactory< AbstractClass, KeyType >::CreateInstance_Internal(), PFactory< AbstractClass, KeyType >::GetKeyList_Internal(), PFactory< AbstractClass, KeyType >::GetMutex(), PFactory< AbstractClass, KeyType >::IsRegistered_Internal(), PFactory< AbstractClass, KeyType >::IsSingleton_Internal(), PFactory< AbstractClass, KeyType >::Register_Internal(), PFactory< AbstractClass, KeyType >::RegisterAs_Internal(), PFactory< AbstractClass, KeyType >::Unregister_Internal(), and PFactory< AbstractClass, KeyType >::UnregisterAll_Internal().