Ocean
|
This class implements a plugin interface. More...
Public Member Functions | |
Plugin ()=default | |
Creates an empty plugin object. More... | |
Plugin (const std::string &filename, const std::string &name, const std::string &description, const PluginType type, const PluginPriority priority, const PluginTypeSet &dependencySet, const std::string &thirdpartyDependences, const std::string &thirdpartyDescription) | |
Creates a new plugin object. More... | |
const std::string & | filename () const |
Returns the filename of the plugin. More... | |
const std::string & | name () const |
Returns the name of the plugin. More... | |
const std::string & | description () const |
Returns the description of the plugin. More... | |
const std::string & | thirdpartyInformation () const |
Returns the version information of the used 3rd party libraries. More... | |
PluginType | type () const |
Returns the type of this plugin. More... | |
const std::string & | thirdpartyDependences () const |
Returns the 3rd party dependences of this plugin. More... | |
const std::string & | thirdpartyDescription () const |
Returns the description about the 3rd party dependences of this plugin. More... | |
bool | load () const |
Loads the plugin. More... | |
bool | loadApple () const |
Loads the plugin (specialization for Apple platforms) More... | |
bool | unload () const |
Tries to unload the plugin. More... | |
bool | unloadApple () const |
Tries to unload the plugin. More... | |
operator bool () const | |
Returns whether the plugin is successfully loaded. More... | |
bool | operator< (const Plugin &right) const |
Returns whether the left plugin has to be loaded before the right one. More... | |
Protected Types | |
typedef bool(* | PluginLoadFunction) () |
Definition of a function pointer for plugin load functions. More... | |
typedef bool(* | PluginUnloadFunction) () |
Definition of a function pointer for plugin unload functions. More... | |
typedef const char *(* | PluginVersionFunction) () |
Definition of a function pointer for plugin version information functions. More... | |
Protected Attributes | |
std::string | filename_ |
Filename of the plugin. More... | |
std::string | name_ |
Name of the plugin. More... | |
std::string | description_ |
Description of the plugin. More... | |
std::string | thirdpartyInformation_ |
3rd party library version information. More... | |
void * | handle_ = nullptr |
Platform specific plugin handle. More... | |
PluginType | type_ = TYPE_UNKNOWN |
Plugin type. More... | |
PluginTypeSet | dependencySet_ |
Set of plugin types this plugin depends on. More... | |
PluginPriority | priority_ = PRIORITY_UNDEFINED |
Load priority of this plugin. More... | |
std::string | thirdpartyDependences_ |
3rd party dependences. More... | |
std::string | thirdpartyDescription_ |
3rd party description. More... | |
PluginLoadFunction | loadFunction_ = nullptr |
Plugin load function. More... | |
PluginUnloadFunction | unloadFunction_ = nullptr |
Plugin unload function. More... | |
This class implements a plugin interface.
|
protected |
Definition of a function pointer for plugin load functions.
|
protected |
Definition of a function pointer for plugin unload functions.
|
protected |
Definition of a function pointer for plugin version information functions.
|
default |
Creates an empty plugin object.
Ocean::PluginManager::Plugin::Plugin | ( | const std::string & | filename, |
const std::string & | name, | ||
const std::string & | description, | ||
const PluginType | type, | ||
const PluginPriority | priority, | ||
const PluginTypeSet & | dependencySet, | ||
const std::string & | thirdpartyDependences, | ||
const std::string & | thirdpartyDescription | ||
) |
Creates a new plugin object.
filename | Plugin filename |
name | Plugin name |
description | Plugin description |
type | Plugin type |
priority | Plugin load priority, the higher the priority the earlier the plugin will be loaded |
dependencySet | Set of ocean plugin types this plugin depends on. |
thirdpartyDependences | 3rd party dependences |
thirdpartyDescription | 3rd party description |
|
inline |
Returns the description of the plugin.
|
inline |
Returns the filename of the plugin.
bool Ocean::PluginManager::Plugin::load | ( | ) | const |
Loads the plugin.
bool Ocean::PluginManager::Plugin::loadApple | ( | ) | const |
|
inline |
Returns the name of the plugin.
|
explicit |
Returns whether the plugin is successfully loaded.
bool Ocean::PluginManager::Plugin::operator< | ( | const Plugin & | right | ) | const |
Returns whether the left plugin has to be loaded before the right one.
right | Right plugin |
|
inline |
Returns the 3rd party dependences of this plugin.
|
inline |
Returns the description about the 3rd party dependences of this plugin.
|
inline |
Returns the version information of the used 3rd party libraries.
|
inline |
Returns the type of this plugin.
bool Ocean::PluginManager::Plugin::unload | ( | ) | const |
Tries to unload the plugin.
All resources using this plugin have to be released to unload the plugin.
bool Ocean::PluginManager::Plugin::unloadApple | ( | ) | const |
Tries to unload the plugin.
(specialization for Apple platforms) All resources using this plugin have to be released to unload the plugin.
|
protected |
Set of plugin types this plugin depends on.
|
protected |
Description of the plugin.
|
protected |
Filename of the plugin.
|
mutableprotected |
Platform specific plugin handle.
|
mutableprotected |
Plugin load function.
|
protected |
Name of the plugin.
|
protected |
Load priority of this plugin.
|
protected |
3rd party dependences.
|
protected |
3rd party description.
|
protected |
3rd party library version information.
|
protected |
Plugin type.
|
mutableprotected |
Plugin unload function.