Public Types | Public Member Functions | Protected Member Functions
TPluginHandler< I > Class Template Reference

The basic template of all plugin handlers. More...

#include <mia/core/handler.hh>

Inheritance diagram for TPluginHandler< I >:
CPluginHandlerBase TFactoryPluginHandler< I > TIOPluginHandler< I >

Public Types

typedef CPluginMap::const_iterator const_iterator
 the iterator to walk over the available plug-ins More...
 
typedef std::map< std::string,
Interface * > 
CPluginMap
 a map containing the names and theavailabe plug-ins More...
 
typedef I Interface
 typedef for the plug-in interface provided by the class More...
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
const std::string get_plugin_names () const
 
const std::set< std::string > get_set () const
 
size_t size () const
 
virtual ~TPluginHandler ()
 
- Public Member Functions inherited from CPluginHandlerBase
void add_dependend_handlers (HandlerHelpMap &handler_map) const
 
 CPluginHandlerBase (const std::string &descriptor)
 
 CPluginHandlerBase (const CPluginHandlerBase &other)=delete
 
const std::string & get_descriptor () const
 
std::string get_handler_type_string () const
 
void get_string_help_description_xml (std::ostream &os, xmlpp::Element *root) const
 
void get_xml_help (xmlpp::Element *root) const
 
CPluginHandlerBaseoperator= (const CPluginHandlerBase &other)=delete
 
void print_help (std::ostream &os) const
 
void print_short_help (std::ostream &os) const
 
virtual ~CPluginHandlerBase ()
 

Protected Member Functions

void add_plugin (Interface *plugin)
 
void initialise (CPathNameArray searchpath)
 
TPluginHandler< I >::Interfaceplugin (const char *plugin) const
 
Constructors
 TPluginHandler ()
 Initializes the plugin handler based on the build-in search path. More...
 

Detailed Description

template<typename I>
class TPluginHandler< I >

The basic template of all plugin handlers.

The template TPluginHandler provides the base interface to all plug-in handlers.

Template Parameters
Ithe plugin interface derived from
See Also
CPluginBase.

Definition at line 54 of file handler.hh.

Member Typedef Documentation

template<typename I>
typedef CPluginMap::const_iterator TPluginHandler< I >::const_iterator

the iterator to walk over the available plug-ins

Definition at line 63 of file handler.hh.

template<typename I>
typedef std::map<std::string, Interface*> TPluginHandler< I >::CPluginMap

a map containing the names and theavailabe plug-ins

Definition at line 60 of file handler.hh.

template<typename I>
typedef I TPluginHandler< I >::Interface

typedef for the plug-in interface provided by the class

Definition at line 57 of file handler.hh.

Constructor & Destructor Documentation

template<typename I>
virtual TPluginHandler< I >::~TPluginHandler ( )
virtual

The destructor frees the modules and plug-ins

template<typename I>
TPluginHandler< I >::TPluginHandler ( )
protected

Initializes the plugin handler based on the build-in search path.

Member Function Documentation

template<typename I>
void TPluginHandler< I >::add_plugin ( Interface plugin)
protected

Add a given plug-in to the handler

Parameters
plugin
template<typename I>
const_iterator TPluginHandler< I >::begin ( ) const
Returns
an iterator to the plug-ins
template<typename I>
const_iterator TPluginHandler< I >::end ( ) const
Returns
the behind-end iterator to the plug-ins
template<typename I>
const std::string TPluginHandler< I >::get_plugin_names ( ) const
Returns
the names of the plug-ins as a space delimited string, ordered case sensitive and alphabetically.
template<typename I>
const std::set<std::string> TPluginHandler< I >::get_set ( ) const
Returns
the names of the plug-ins as a set
template<typename I>
void TPluginHandler< I >::initialise ( CPathNameArray  searchpath)
protected
template<typename I>
TPluginHandler<I>::Interface* TPluginHandler< I >::plugin ( const char *  plugin) const
protected

find a plugin by name. If the plug-in is not available, the method throws an invalid_argument exception.

Parameters
pluginname of the plugin
Returns
pointer to the plug-in
template<typename I>
size_t TPluginHandler< I >::size ( ) const
Returns
the number of available plug-ins

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