Elm
2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
|
#include <elm/sys/Plugin.h>
Classes | |
class | make |
Public Types | |
typedef Array< string > | aliases_t |
typedef List< Plugin * >::Iter | DepIter |
Public Member Functions | |
Plugin (string name, const Version &plugger_version, CString hook="", const aliases_t &aliases=aliases_t::null) | |
Plugin (const make &maker) | |
virtual | ~Plugin (void) |
string | name (void) const |
CString | description (void) const |
CString | licence (void) const |
const Version & | pluginVersion (void) const |
const Version & | pluggerVersion (void) const |
CString | hook (void) const |
const aliases_t & | aliases (void) const |
bool | matches (const string &name) const |
void | unplug (void) |
const Path & | path (void) const |
DepIter | dependencies (void) const |
Static Public Attributes | |
static const t::uint32 | MAGIC = 0xCAFEBABE |
Protected Member Functions | |
virtual void | startup (void) |
virtual void | cleanup (void) |
Protected Attributes | |
CString | _description |
CString | _licence |
Version | _plugin_version |
Plugin | ( | string | name, |
const Version & | plugger_version, | ||
CString | hook = "" , |
||
const aliases_t & | aliases = aliases_t::null |
||
) |
Build a new plugin.
name | Plugin name. |
plugger_version | Plugger version (used for checking compatibility between plugin and user application API). |
hook | Hook of a matching plugger |
aliases | Name aliases for the plugin. |
References Plugin::aliases(), and Plugin::hook().
New-style builder for plugin using Plugin::Maker.
maker | Maker for plugin. |
References Vector< T, E, A >::addAll(), and Vector< T, E, A >::detach().
This method is called just before the plugin removal from the user application. It may be overriden for performing specific clean up.
Referenced by Plugin::unplug().
Test if the current plugin matches the given name, that is, if the name or one of the aliases matches the name.
name | Name to test. |
References Plugin::name().
This method is called just after the plugin has been plugged into the user application. It may be overriden for performing specific initializations.
Call it when the plugin is no more used.
References Plugin::cleanup().
|
protected |
Referenced by Plugin::description().
|
protected |
Referenced by Plugin::licence().
|
protected |
Referenced by Plugin::pluginVersion().
|
static |
Referenced by Plugger::plugFile().