THandlerSingleton< T > Class Template Reference

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

#include <mia/core/handler.hh>

Inherits T.

Public Types

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

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 157 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 170 of file handler.hh.

◆ Instance

template<typename T>
typedef T THandlerSingleton< T >::Instance

The instance of the plugin handler.

Definition at line 167 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 173 of file handler.hh.

Member Function Documentation

◆ add_plugin()

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

◆ instance()

◆ pointer()

template<typename T>
static 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>
static 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
staticprotected

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

Definition at line 191 of file handler.hh.


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