Support for dynamically loaded plugins.
More...
Support for dynamically loaded plugins.
◆ Plugin_factory
typedef Plugin * mi::base::Plugin_factory(unsigned int index, void *context) |
Typedef for the initializer function to be provided by every plugin.
The initializer function is used to obtain an instance of every plugin class. Note that the actual definition of the initializer function needs to be marked as
- Parameters
-
index | The index of the plugin. |
context | The execution context for the plugin. |
◆ get_compiler()
virtual const char * mi::base::Plugin::get_compiler |
( |
| ) |
const |
|
inlinevirtual |
Returns the compiler used to compile the plugin.
◆ get_name()
virtual const char * mi::base::Plugin::get_name |
( |
| ) |
const |
|
pure virtual |
Returns the name of the plugin.
◆ get_plugin()
virtual base::Plugin * mi::base::IPlugin_descriptor::get_plugin |
( |
| ) |
const |
|
pure virtual |
Returns the plugin itself.
- Note
- The returned pointer is not referenced-counted. It is only valid as long as the plugin descriptor is valid.
- Returns
- The plugin.
◆ get_plugin_library_path()
virtual const char * mi::base::IPlugin_descriptor::get_plugin_library_path |
( |
| ) |
const |
|
pure virtual |
Returns the library path of the plugin.
- Returns
- The library path of the plugin, or
NULL
in case of failure.
◆ get_plugin_system_version()
virtual Sint32 mi::base::Plugin::get_plugin_system_version |
( |
| ) |
const |
|
inlinevirtual |
Returns the version of the plugin system used to compile this.
This can be useful when the plugin system is extended/changed at some point to be able to still support older plugins or at least to reject them. The only thing which must not be changed is that the first virtual function is this one.
- Returns
- The version number of the plugin system.
◆ get_string_property()
virtual const char * mi::base::Plugin::get_string_property |
( |
Sint32 |
index, |
|
|
const char ** |
value |
|
) |
| |
|
inlinevirtual |
Returns a plugin property.
Plugin properties are represented as key-value pairs. The caller can iterate over all such existing pairs by calling with indexes starting at 0 and increasing by 1 until the call returns 0.
- Parameters
-
index | The index to query. |
value | The property value for index . |
- Returns
- The property key for
index
.
◆ get_type()
virtual const char * mi::base::Plugin::get_type |
( |
| ) |
const |
|
pure virtual |
Returns the type of the plugin.
See the documentation of derived interfaces for possible values.
◆ get_version()
virtual Sint32 mi::base::Plugin::get_version |
( |
| ) |
const |
|
inlinevirtual |
Returns the version number of the plugin.
◆ release()
virtual void mi::base::Plugin::release |
( |
| ) |
|
|
pure virtual |
Destroys the plugin instance.
This method should not be confused with mi::base::IInterface::release() which decrements the reference count. Plugins are not reference counted and this method here rather destroys the plugin instance.