PFactoryBase Class Referenceabstract

Base class for generic factories. More...

`#include <pfactory.h>`

Inheritance diagram for PFactoryBase:

## 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

## Detailed Description

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.

## Constructor & Destructor Documentation

PFactoryBase::PFactoryBase | ( |  | ) |

inline protected

virtual PFactoryBase::~PFactoryBase | ( |  | ) |

inline virtual

## Member Function Documentation

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().

## Member Data Documentation

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().

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

- pfactory.h