|
Swarm-NG
1.1
|
Template class for easy plugin development. More...
#include <plugin.hpp>
Public Member Functions | |
| basic_plugin (const std::string &i, const std::string &d=std::string()) | |
| Specify id and description in the constructor. | |
| virtual void * | create (const config &cfg) |
| Instance the class T and return it. | |
| virtual std::string | id () |
| id as specified in constructor | |
| virtual std::string | description () |
| description as specified in constructor | |
Additional Inherited Members | |
Static Public Member Functions inherited from swarm::plugin | |
| static void | add (plugin *p) |
| Register a new plugin. | |
| static plugin * | find (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 inherited from swarm::plugin | |
| static help_t | help |
| Plugin the list of plugins in a nice format To use: More... | |
Template class for easy plugin development.
class T should have a constructor that takes config as parameter.
Making plugins that make an instance of a specific class is a pretty common task. To define the plugin class for your plugin package:
Definition at line 87 of file plugin.hpp.