This is a snapshot of a work-in-progress documentation theme. If you feel lost, miss something, or want to see the original Doxygen docs instead, head over to the archived version of this documentation page.

Corrade::PluginManager::PluginMetadata class

Plugin metadata.


This class stores metadata about particular plugin. The plugin metadata are stored in plugin configuration file, which resides either besides the dynamic plugin binary in a filesystem or is compiled directly into executable with an static plugin. See Plugin management for tutorial and brief introduction into how plugins work.

The plugin configuration file has an simple syntax (see Utility::Configuration class documentation for full specification). The file stores list of dependencies (if the plugin depends on another), list of aliases and optionally plugin-specific configuration. Example Matrix.conf file for Matrix plugin:

# Dependencies

# Aliases

# Optional plugin-specific data
description=My first matrix without bugs

According to the configuration file, the Matrix plugin can be loaded only if SomeRandomJohnDoesPlugin, BaseMatrixPlugin and 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.

Public functions

auto name() const -> std::string
Plugin name.
auto depends() const -> const std::vector<std::string>&
Plugins on which this plugin depend.
auto usedBy() const -> std::vector<std::string>
Plugins which depend on this plugin.
auto provides() const -> const std::vector<std::string>&
Plugins which are provided by this plugin.
auto data() const -> const Utility::ConfigurationGroup&
Plugin-specific data.

Function documentation

const std::vector<std::string>& Corrade::PluginManager::PluginMetadata::depends() const

Plugins on which this plugin depend.

List of plugins which must be loaded before this plugin can be loaded.

std::vector<std::string> Corrade::PluginManager::PluginMetadata::usedBy() const

Plugins which depend on this plugin.

List of plugins which uses this plugin. This plugin cannot be unloaded when any of these plugins are loaded.

const std::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.

const Utility::ConfigurationGroup& Corrade::PluginManager::PluginMetadata::data() const

Plugin-specific data.

Additional plugin-specific data, contained in the [data] group of plugin configuration.