THandlerSingleton< T > Class Template Reference
Plug-in handling

the singleton that a plug-in handler really is More...

`#include <mia/core/handler.hh>`

Inheritance diagram for THandlerSingleton< T >:
[legend]

## Public Types

typedef T::const_iterator | const_iterator
| iterator to iterator over the actual plug-ins
typedef T | Instance
| The instance of the plugin handler.
typedef T::CPluginMap::value_type | value_type
| the name,plug-in pair

## Static Public Member Functions

static bool | add_plugin (typename T::PInterface p)
static const T & | instance ()
static const T * | pointer ()
static void | set_search_path (const CPluginSearchpath &searchpath)

## Static Protected Attributes

static CMutex | m_creation_mutex

## Detailed Description

template<typename T>
class THandlerSingleton< T >

the singleton that a plug-in handler really is

Class to make a singleton out of a plugin handler by deriving from it.

Definition at line 158 of file handler.hh.

## Member Typedef Documentation

## const_iterator

template<typename T>

typedef T::const_iterator THandlerSingleton< T >::const_iterator

iterator to iterator over the actual plug-ins

Definition at line 172 of file handler.hh.

## Instance

template<typename T>

typedef T THandlerSingleton< T >::Instance

The instance of the plugin handler.

Definition at line 169 of file handler.hh.

## value_type

template<typename T>

typedef T::CPluginMap::value_type THandlerSingleton< T >::value_type

the name,plug-in pair

Remarks
  why do I need this

Definition at line 175 of file handler.hh.

## Member Function Documentation

## add_plugin()

template<typename T>

bool THandlerSingleton< T >::add_plugin | ( | typename T::PInterface | p | ) |

static

## instance()

template<typename T>

const T & THandlerSingleton< T >::instance | ( |  | ) |

static

Returns
  a reference to the only instance of the plugin handler

## pointer()

template<typename T>

const T * THandlerSingleton< T >::pointer | ( |  | ) |

static

Returns
  a pointer to the only instance of the plugin handler, it is possible that this instance is not yet initialized.

## set_search_path()

template<typename T>

void THandlerSingleton< T >::set_search_path | ( | const CPluginSearchpath & | searchpath | ) |

static

Set the plugin search path for the plug-in - throws "runtime_error" if the plugin handler is already instanciated.

## Field Documentation

## m_creation_mutex

template<typename T>

CMutex THandlerSingleton< T >::m_creation_mutex

static protected

This mutex ensures that each Singleton is indeed only created once and no race condition happens within a multi-threaded environmnet

Definition at line 193 of file handler.hh.

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

- handler.hh