This class stores metadata about a particular plugin. The plugin metadata are stored in a plugin metadata file, which resides either besides the dynamic plugin binary in a filesystem or is compiled directly into executable with a static plugin. See Plugin management for a tutorial and brief introduction to how plugins work.
The plugin metadata file has a simple INI-like syntax (see Utility::
Matrix.conf file for a
# Dependencies depends=SomeRandomJohnDoesPlugin depends=BaseMatrixPlugin depends=SkyNetPlugin # Aliases provides=RealWorld provides=RealButSlightlyTwistedWorld # Optional plugin-specific data [data] description=My first matrix without bugs # Optional plugin-specific configuration [configuration] redPillOrBluePill=red
According to the configuration file, the
Matrix plugin can be loaded only if
SkyNetPlugin are found can be loaded. It will be also loaded when requesting
RealWorld plugin, but only if this is the first plugin providing it.
[data] section can contain read-only data that can be used for example to provide additional info about the plugin in a user interface and is accessible through data().
[configuration] section contains initial configuration data that can be modified by the user to setup a particular plugin instance beyond what's possible via the plugin interface. The initial configuration is accessible through configuration(), while a modifiable copy is stored in each plugin instance, accessible through AbstractPlugin::
- auto operator=(const PluginMetadata&) -> PluginMetadata& deleted
- Copying is not allowed.
- auto operator=(PluginMetadata&&) -> PluginMetadata& deleted
- Moving is not allowed.
auto name() const -> std::
- Plugin name.
auto depends() const -> const std::
- Plugins on which this plugin depend.
auto usedBy() const -> std::
- Plugins which depend on this plugin.
auto provides() const -> const std::
- Plugins which are provided by this plugin.
auto data() const -> const Utility::
- Plugin-specific data.
auto configuration() -> Utility::
- Initial plugin-specific configuration.
auto configuration() const -> const Utility::
vector<std:: string>& Corrade:: PluginManager:: PluginMetadata:: provides() const
Plugins which are provided by this plugin.
List of plugin names that are alias to this plugin when loading the plugin by name (not as dependency) if there is no plugin with that name. If there is more than one alias for given name, the first found is used.
ConfigurationGroup& Corrade:: PluginManager:: PluginMetadata:: configuration()
Initial plugin-specific configuration.
Initial plugin-specific configuration, contained in the
[configuration] group of plugin configuration. A plugin-local copy is stored in each plugin instance, available through AbstractPlugin::
[configuration] group was not present in the metadata, the returned group is empty.