PFactory< _Abstract_T, _Key_T > Class Template Reference

#include <pfactory.h>

Inheritance diagram for PFactory< _Abstract_T, _Key_T >:

PFactoryBase PDevicePluginFactory< _Abstract_T, _Key_T > List of all members.

Public Types

typedef _Key_T Key_T
typedef _Abstract_T Abstract_T
typedef std::map< _Key_T,
WorkerBase * > 
KeyMap_T
typedef std::vector< _Key_T > KeyList_T

Static Public Member Functions

static void Register (const _Key_T &key, WorkerBase *worker)
static void Register (const _Key_T &key, Abstract_T *instance)
static BOOL 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)
static BOOL IsSingleton (const _Key_T &key)
static KeyList_T GetKeyList ()
static KeyMap_TGetKeyMap ()
static PMutexGetMutex ()

Protected Member Functions

 PFactory ()
 ~PFactory ()
void Register_Internal (const _Key_T &key, WorkerBase *worker)
BOOL 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 PFactoryGetInstance ()

Protected Attributes

KeyMap_T keyMap

Classes

class  Worker
class  WorkerBase

Detailed Description

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
class PFactory< _Abstract_T, _Key_T >

Template class for generic factories of an abstract class.


Member Typedef Documentation

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
typedef _Key_T PFactory< _Abstract_T, _Key_T >::Key_T

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
typedef _Abstract_T PFactory< _Abstract_T, _Key_T >::Abstract_T

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
typedef std::map<_Key_T, WorkerBase *> PFactory< _Abstract_T, _Key_T >::KeyMap_T

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
typedef std::vector<_Key_T> PFactory< _Abstract_T, _Key_T >::KeyList_T


Constructor & Destructor Documentation

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
PFactory< _Abstract_T, _Key_T >::PFactory (  )  [inline, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
PFactory< _Abstract_T, _Key_T >::~PFactory (  )  [inline, protected]


Member Function Documentation

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static void PFactory< _Abstract_T, _Key_T >::Register ( const _Key_T &  key,
WorkerBase worker 
) [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static void PFactory< _Abstract_T, _Key_T >::Register ( const _Key_T &  key,
Abstract_T instance 
) [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static BOOL PFactory< _Abstract_T, _Key_T >::RegisterAs ( const _Key_T &  newKey,
const _Key_T &  oldKey 
) [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static void PFactory< _Abstract_T, _Key_T >::Unregister ( const _Key_T &  key  )  [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static void PFactory< _Abstract_T, _Key_T >::UnregisterAll (  )  [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static bool PFactory< _Abstract_T, _Key_T >::IsRegistered ( const _Key_T &  key  )  [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static _Abstract_T* PFactory< _Abstract_T, _Key_T >::CreateInstance ( const _Key_T &  key  )  [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static BOOL PFactory< _Abstract_T, _Key_T >::IsSingleton ( const _Key_T &  key  )  [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static KeyList_T PFactory< _Abstract_T, _Key_T >::GetKeyList (  )  [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static KeyMap_T& PFactory< _Abstract_T, _Key_T >::GetKeyMap (  )  [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static PMutex& PFactory< _Abstract_T, _Key_T >::GetMutex (  )  [inline, static]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
static PFactory& PFactory< _Abstract_T, _Key_T >::GetInstance (  )  [inline, static, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
void PFactory< _Abstract_T, _Key_T >::Register_Internal ( const _Key_T &  key,
WorkerBase worker 
) [inline, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
BOOL PFactory< _Abstract_T, _Key_T >::RegisterAs_Internal ( const _Key_T &  newKey,
const _Key_T &  oldKey 
) [inline, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
void PFactory< _Abstract_T, _Key_T >::Unregister_Internal ( const _Key_T &  key  )  [inline, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
void PFactory< _Abstract_T, _Key_T >::UnregisterAll_Internal (  )  [inline, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
bool PFactory< _Abstract_T, _Key_T >::IsRegistered_Internal ( const _Key_T &  key  )  [inline, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
_Abstract_T* PFactory< _Abstract_T, _Key_T >::CreateInstance_Internal ( const _Key_T &  key  )  [inline, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
bool PFactory< _Abstract_T, _Key_T >::IsSingleton_Internal ( const _Key_T &  key  )  [inline, protected]

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
KeyList_T PFactory< _Abstract_T, _Key_T >::GetKeyList_Internal (  )  [inline, protected]


Member Data Documentation

template<class _Abstract_T, typename _Key_T = PDefaultPFactoryKey>
KeyMap_T PFactory< _Abstract_T, _Key_T >::keyMap [protected]


The documentation for this class was generated from the following file:
Generated on Fri Mar 7 06:25:04 2008 for PTLib by  doxygen 1.5.1