Swarm-NG  1.1
swarm::plugin Struct Referenceabstract

Abstract interface class for all plugins. More...

#include <plugin.hpp>

Inheritance diagram for swarm::plugin:
swarm::basic_plugin< T >

Public Member Functions

virtual void * create (const config &cfg)=0
 Instance the plugin and return the main class of the package.
 
virtual std::string description ()
 Human readable text to describe the purpose of the plugin.
 
virtual std::string id ()=0
 Unique identifier for plugin, should use the correct prefix. For integrators use: "integrator_" prefix For writers use: "writer_" prefix.
 

Static Public Member Functions

static void add (plugin *p)
 Register a new plugin.
 
static pluginfind (const std::string &id)
 Find a plugin by id()
 
static void * instance (const std::string &name, const config &cfg)
 Find and instance the pluging with specified configuration.
 
static std::vector< plugin * > all ()
 List of all registered plugins.
 

Static Public Attributes

static help_t help
 Plugin the list of plugins in a nice format To use: More...
 

Detailed Description

Abstract interface class for all plugins.

Derived intstances should implement create method for instancing the main class of the plugin package. id is used to identify the package for the plugin look-up table.

It is difficult to use the abstract class, one should use the helper classes integrator_plugin_initializer, writer_plugin_initializer .

Definition at line 44 of file plugin.hpp.

Member Data Documentation

plugin::help_t swarm::plugin::help
static

Plugin the list of plugins in a nice format To use:

std::cout << plugin::help << std::endl;

Definition at line 70 of file plugin.hpp.


The documentation for this struct was generated from the following files: