Public Types | Static Public Member Functions | Static Protected Attributes
THandlerSingleton< T > Class Template Reference

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

#include <mia/core/handler.hh>

Inheritance diagram for THandlerSingleton< 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 const T & instance ()
 
static const T * pointer ()
 
static void set_search_path (const CPathNameArray &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 143 of file handler.hh.

Member Typedef Documentation

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

iterator to iterator over the actual plug-ins

Definition at line 156 of file handler.hh.

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

The instance of the plugin handler.

Definition at line 153 of file handler.hh.

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

Member Function Documentation

template<typename T >
static const T& THandlerSingleton< T >::instance ( )
static
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.
template<typename T >
static void THandlerSingleton< T >::set_search_path ( const CPathNameArray searchpath)
static

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

Field Documentation

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


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