PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PFactoryTemplate< AbstractClass, ParamType, KeyType > Class Template Reference

Template class for generic factories of an abstract class. More...

`#include <pfactory.h>`

Inheritance diagram for PFactoryTemplate< AbstractClass, ParamType, KeyType >:
[legend]
Collaboration diagram for PFactoryTemplate< AbstractClass, ParamType, KeyType >:
[legend]

## Classes
class | WorkerBase

## Public Types
typedef AbstractClass | Abstract_T
typedef ParamType | Param_T
typedef KeyType | Key_T
typedef std::vector< Key_T > | KeyList_T
typedef std::map< Key_T, WorkerBase * > | WorkerMap_T
typedef WorkerMap_T::iterator | WorkerIter_T

## Public Member Functions
virtual void | DestroySingletons ()
Public Member Functions inherited from PFactoryBase
virtual | ~PFactoryBase ()

## Protected Member Functions
| PFactoryTemplate ()
| ~PFactoryTemplate ()
bool | InternalRegister (const Key_T &key, WorkerBase *worker)
bool | InternalRegister (const Key_T &key, Abstract_T *instance, bool autoDeleteInstance)
PBoolean | InternalRegisterAs (const Key_T &newKey, const Key_T &oldKey)
void | InternalUnregister (const Key_T &key)
void | InternalUnregister (WorkerBase *instance)
void | InternalUnregisterAll ()
bool | InternalIsRegistered (const Key_T &key)
Abstract_T * | InternalCreateInstance (const Key_T &key, Param_T param)
void | InternalDestroy (const Key_T &key, Abstract_T *instance)
bool | InternalIsSingleton (const Key_T &key)
KeyList_T | InternalGetKeyList ()
Protected Member Functions inherited from PFactoryBase
| PFactoryBase ()

## Protected Attributes
WorkerMap_T | m_workers
Protected Attributes inherited from PFactoryBase
PMutex | m_mutex

## Additional Inherited Members
Static Public Member Functions inherited from PFactoryBase
static FactoryMap & | GetFactories ()
Static Protected Member Functions inherited from PFactoryBase
static PFactoryBase & | InternalGetFactory (const std::string &className, PFactoryBase *(*createFactory)())
template<class TheFactory >
static PFactoryBase * | CreateFactory ()
template<class TheFactory >
static TheFactory & | GetFactoryAs ()

## Detailed Description

### template<class AbstractClass, typename ParamType, typename KeyType>
class PFactoryTemplate< AbstractClass, ParamType, KeyType >

Template class for generic factories of an abstract class.

## Member Typedef Documentation

template<class AbstractClass, typename ParamType, typename KeyType>

typedef AbstractClass PFactoryTemplate< AbstractClass, ParamType, KeyType >::Abstract_T

template<class AbstractClass, typename ParamType, typename KeyType>

typedef KeyType PFactoryTemplate< AbstractClass, ParamType, KeyType >::Key_T

template<class AbstractClass, typename ParamType, typename KeyType>

typedef std::vector<Key_T> PFactoryTemplate< AbstractClass, ParamType, KeyType >::KeyList_T

template<class AbstractClass, typename ParamType, typename KeyType>

typedef ParamType PFactoryTemplate< AbstractClass, ParamType, KeyType >::Param_T

template<class AbstractClass, typename ParamType, typename KeyType>

typedef WorkerMap_T::iterator PFactoryTemplate< AbstractClass, ParamType, KeyType >::WorkerIter_T

template<class AbstractClass, typename ParamType, typename KeyType>

typedef std::map<Key_T, WorkerBase*> PFactoryTemplate< AbstractClass, ParamType, KeyType >::WorkerMap_T

## Constructor & Destructor Documentation

template<class AbstractClass, typename ParamType, typename KeyType>

PFactoryTemplate< AbstractClass, ParamType, KeyType >::PFactoryTemplate | ( |  | ) |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

PFactoryTemplate< AbstractClass, ParamType, KeyType >::~PFactoryTemplate | ( |  | ) |
| inline protected

## Member Function Documentation

template<class AbstractClass, typename ParamType, typename KeyType>

virtual void PFactoryTemplate< AbstractClass, ParamType, KeyType >::DestroySingletons | ( |  | ) |
| inline virtual

Implements PFactoryBase.

Referenced by PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::~PFactoryTemplate().

template<class AbstractClass, typename ParamType, typename KeyType>

Abstract_T* PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalCreateInstance | ( | const Key_T & | key,
|  | Param_T | param
| ) |  |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

void PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalDestroy | ( | const Key_T & | key,
|  | Abstract_T * | instance
| ) |  |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

KeyList_T PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalGetKeyList | ( |  | ) |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

bool PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalIsRegistered | ( | const Key_T & | key | ) |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

bool PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalIsSingleton | ( | const Key_T & | key | ) |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

bool PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalRegister | ( | const Key_T & | key,
|  | WorkerBase * | worker
| ) |  |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

bool PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalRegister | ( | const Key_T & | key,
|  | Abstract_T * | instance,
|  | bool | autoDeleteInstance
| ) |  |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

PBoolean PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalRegisterAs | ( | const Key_T & | newKey,
|  | const Key_T & | oldKey
| ) |  |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

void PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalUnregister | ( | const Key_T & | key | ) |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

void PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalUnregister | ( | WorkerBase * | instance | ) |
| inline protected

template<class AbstractClass, typename ParamType, typename KeyType>

void PFactoryTemplate< AbstractClass, ParamType, KeyType >::InternalUnregisterAll | ( |  | ) |
| inline protected

## Member Data Documentation

template<class AbstractClass, typename ParamType, typename KeyType>

WorkerMap_T PFactoryTemplate< AbstractClass, ParamType, KeyType >::m_workers
| protected

Referenced by PFactoryTemplate< AbstractClass, const KeyType &, KeyType >::DestroySingletons(), 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().

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

- pfactory.h