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