| OpenMS 2.5.0

Static Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
SingletonRegistry Class Reference
Concept

Holds pointers to unique instance of a singleton factory. More...

`#include <OpenMS/CONCEPT/SingletonRegistry.h>`

## Static Public Member Functions

static FactoryBase * | getFactory (const String &name)
| return DefaultParamHandler according to unique identifier `name` More...
static void | registerFactory (const String &name, FactoryBase *instance)
| register new concrete Factory More...
static bool | isRegistered (String name)
| Returns if a factory is registered. More...

## Private Types

typedef std::map< String, FactoryBase * > | Map
| Function signature of creator function. More...
typedef Map::const_iterator | MapIterator

## Private Member Functions

virtual | ~SingletonRegistry ()
| destructor More...
| SingletonRegistry ()
| C'Tor. More...

## Static Private Member Functions

static SingletonRegistry * | instance_ ()
| singleton access to SingletonRegistry More...

## Private Attributes

Map | inventory_

## Static Private Attributes

static SingletonRegistry * | singletonRegistryInstance_

## Friends

class | singletonsNeedNoFriends

## Detailed Description

Holds pointers to unique instance of a singleton factory.

Note
  : NEVER(!) include this file anywhere (except for the SingletonRegistry.cpp)! :D

## Member Typedef Documentation

## ◆ Map

typedef std::map<String, FactoryBase *> Map

private

Function signature of creator function.

## ◆ MapIterator

typedef Map::const_iterator MapIterator

private

## Constructor & Destructor Documentation

## ◆ ~SingletonRegistry()

virtual ~SingletonRegistry | ( |  | ) |

inline private virtual

destructor

## ◆ SingletonRegistry()

SingletonRegistry | ( |  | ) |

inline private

C'Tor.

## Member Function Documentation

## ◆ getFactory()

static FactoryBase* getFactory | ( | const String & | name | ) |

inline static

return DefaultParamHandler according to unique identifier `name`

Referenced by Factory< FactoryProduct >::instance_().

## ◆ instance_()

static SingletonRegistry* instance_ | ( |  | ) |

inline static private

singleton access to SingletonRegistry

## ◆ isRegistered()

static bool isRegistered | ( | String | name | ) |

inline static

Returns if a factory is registered.

Referenced by Factory< FactoryProduct >::instance_().

## ◆ registerFactory()

static void registerFactory | ( | const String & | name,
|  | FactoryBase * | instance
| ) |  |

inline static

register new concrete Factory

Parameters

  name | unique name for Factory of certain type
  instance | pointer to this Factory

Referenced by Factory< FactoryProduct >::instance_().

## Friends And Related Function Documentation

## ◆ singletonsNeedNoFriends

friend class singletonsNeedNoFriends

friend

## Member Data Documentation

## ◆ inventory_

Map inventory_

private

## ◆ singletonRegistryInstance_

SingletonRegistry* singletonRegistryInstance_

static private