# PFactory< AbstractClass, KeyType >::WorkerBase Class Reference

`#include <pfactory.h>`

Inheritance diagram for PFactory< AbstractClass, KeyType >::WorkerBase:

List of all members.

## Protected Types

| NonSingleton
| StaticSingleton
| DynamicSingleton
enum | Types { NonSingleton, StaticSingleton, DynamicSingleton }

## Protected Member Functions

| WorkerBase (bool singleton=false)
| WorkerBase (Abstract_T *instance, bool delSingleton=true)
virtual | ~WorkerBase ()
Abstract_T * | CreateInstance (const Key_T &key)
virtual Abstract_T * | Create (const Key_T &) const
virtual void | DestroySingleton ()
bool | IsSingleton () const

## Protected Attributes

enum PFactory::WorkerBase::Types | m_type
Abstract_T * | m_singletonInstance

### template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>
class PFactory< AbstractClass, KeyType >::WorkerBase

## Member Enumeration Documentation

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

enum PFactory::WorkerBase::Types `[protected]`

Enumerator:

  NonSingleton |
  StaticSingleton |
  DynamicSingleton |

## Constructor & Destructor Documentation

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

PFactory< AbstractClass, KeyType >::WorkerBase::WorkerBase | ( | bool | singleton = `false` | ) | `[inline, protected]`

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

PFactory< AbstractClass, KeyType >::WorkerBase::WorkerBase | ( | Abstract_T * | instance,
|  | bool | delSingleton = `true` |
| ) |  |  | `[inline, protected]`

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

virtual PFactory< AbstractClass, KeyType >::WorkerBase::~WorkerBase | ( |  | ) | `[inline, protected, virtual]`

## Member Function Documentation

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

virtual Abstract_T* PFactory< AbstractClass, KeyType >::WorkerBase::Create | ( | const Key_T & |  | ) | const`[inline, protected, virtual]`

Reimplemented in PFactory< AbstractClass, KeyType >::Worker< ConcreteClass >, and PDevicePluginFactory< AbstractClass, KeyType >::Worker.

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

Abstract_T* PFactory< AbstractClass, KeyType >::WorkerBase::CreateInstance | ( | const Key_T & | key | ) | `[inline, protected]`

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

virtual void PFactory< AbstractClass, KeyType >::WorkerBase::DestroySingleton | ( |  | ) | `[inline, protected, virtual]`

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

bool PFactory< AbstractClass, KeyType >::WorkerBase::IsSingleton | ( |  | ) | const`[inline, protected]`

## Member Data Documentation

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

Abstract_T* PFactory< AbstractClass, KeyType >::WorkerBase::m_singletonInstance `[protected]`

template<class AbstractClass, typename KeyType = PDefaultPFactoryKey>

enum PFactory::WorkerBase::Types PFactory< AbstractClass, KeyType >::WorkerBase::m_type `[protected]`

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

- pfactory.h