The base class for all plug-ins. More...
#include <mia/core/plugin_base.hh>
Public Member Functions | |
void | add_dependend_handlers (HandlerHelpMap &handler_map) |
void | add_parameter (const std::string &name, CParameter *param) |
void | append_interface (CPluginBase *plugin) |
void | check_parameters () |
CPluginBase (const char *name) | |
const std::string | get_descr () const |
virtual void | get_help (std::ostream &os) const |
void | get_help_xml (xmlpp::Element &root) const |
PPluginModule | get_module () const |
const char * | get_name () const |
void | get_short_help (std::ostream &os) const |
bool | has_property (const char *property) const |
CPluginBase * | next_interface () |
void | set_module (const PPluginModule &module) |
void | set_parameters (const CParsedOptions &options) |
virtual | ~CPluginBase () |
Protected Member Functions | |
void | add_property (const char *property) |
The base class for all plug-ins.
The base class for all plug-ins. It supports handling parameters and a provides a help interface.
Definition at line 52 of file plugin_base.hh.
CPluginBase::CPluginBase | ( | const char * | name) |
The constructor initialises the plug-in with its name and sets its link-up to nil ant initialises its parameter map.
name |
|
virtual |
this destructur exists for the sole purpouse to ensure a virtual destructor for all plug-ins.
void CPluginBase::add_dependend_handlers | ( | HandlerHelpMap & | handler_map) |
Add all plugin handlers that may be called by this plugin
[in,out] | handler_map |
void CPluginBase::add_parameter | ( | const std::string & | name, |
CParameter * | param | ||
) |
Add a parameter to the parameter list. If the name of the parameter already exists this function throws an invalid_argument exception.
name | Name of the new parameter |
param | the actual parameter |
|
protected |
Add a porperty to the map of supported properties
property | a named property |
void CPluginBase::append_interface | ( | CPluginBase * | plugin) |
link up another plug-in in order to be able to put several plug-ins of the same type into the same dynamic library
void CPluginBase::check_parameters | ( | ) |
This function checks, whether all requzired parameters have really been set. It throws an invalid_argument
const std::string CPluginBase::get_descr | ( | ) | const |
|
virtual |
prints out a help text to the given output stream
os |
Reimplemented in TPlugin< D, T >, TPlugin< test_plugin_data, test_plugin_type >, TPlugin< P::plugin_data, P::plugin_type >, TPlugin< D, io_plugin_type >, TPlugin< C2DImageFifoFilter::plugin_data, C2DImageFifoFilter::plugin_type >, TPlugin< test_io_data, io_plugin_type >, TPlugin< CSplineBoundaryCondition::plugin_data, CSplineBoundaryCondition::plugin_type >, TPlugin< TTransformCreator< Transform >::plugin_data, TTransformCreator< Transform >::plugin_type >, TPlugin< C3DSplineTransformPenalty::plugin_data, C3DSplineTransformPenalty::plugin_type >, TPlugin< TDataFilter< Image >::plugin_data, TDataFilter< Image >::plugin_type >, TPlugin< C2DSplineTransformPenalty::plugin_data, C2DSplineTransformPenalty::plugin_type >, TPlugin< TFullCost< Transform >::plugin_data, TFullCost< Transform >::plugin_type >, TPlugin< C3DRegTimeStep::plugin_data, C3DRegTimeStep::plugin_type >, and TPlugin< C2DRegTimeStep::plugin_data, C2DRegTimeStep::plugin_type >.
void CPluginBase::get_help_xml | ( | xmlpp::Element & | root) | const |
Adds the help for this plug-in to an XML tree
root | node to add the help to |
PPluginModule CPluginBase::get_module | ( | ) | const |
const char* CPluginBase::get_name | ( | ) | const |
void CPluginBase::get_short_help | ( | std::ostream & | os) | const |
Write a help regarding the plugin to the output stream
os |
bool CPluginBase::has_property | ( | const char * | property) | const |
property | a named property |
CPluginBase* CPluginBase::next_interface | ( | ) |
void CPluginBase::set_module | ( | const PPluginModule & | module) |
set the shared modules containing the code of this plugin This enshures that the modules is not unloaded while the plug-in still exists and needs to call its destructor whos code resides in the module.
module |
void CPluginBase::set_parameters | ( | const CParsedOptions & | options) |
Set the parameter according to the given option map. If the parameter name does not exists, the function will throw an invalid_argument exception. Depending on the parameter type setting it might also throw an invalid_argument exception.
options | the options map |