namespace
PluginManagerPlugin management.
This library contains Manager, which takes care of loading, unloading and instancing plugins. There is also an AbstractPlugin class, which is the base of all plugins. See Plugin management for a brief introduction to how plugins work.
This library is built if WITH_PLUGINMANAGER
is enabled when building Corrade. To use this library with CMake, you need to request the PluginManager
component of the Corrade
package and link to the Corrade::PluginManager
target:
find_package(Corrade REQUIRED PluginManager) # ... target_link_libraries(your-app Corrade::PluginManager)
See also Downloading and building Corrade and Using Corrade with CMake for more information.
Classes
- class AbstractManager
- Non-templated base for plugin managers.
-
template<class Interface>class AbstractManagingPlugin
- Base class for plugin interfaces with access to associated manager.
- class AbstractPlugin
- Base class for plugin interfaces.
-
template<class T>class Manager
- Plugin manager.
- class PluginMetadata
- Plugin metadata.
Enums
- enum class LoadState: unsigned short { NotFound = 1 << 0, WrongPluginVersion = 1 << 1, WrongInterfaceVersion = 1 << 2, WrongMetadataFile = 1 << 3, UnresolvedDependency = 1 << 4, LoadFailed = 1 << 5, Static = 1 << 6, Loaded = (1 << 7) | LoadState::Static, NotLoaded = 1 << 8, UnloadFailed = 1 << 9, Required = 1 << 10, Used = 1 << 11 }
- Plugin load state.
Typedefs
-
using LoadStates = Containers::
EnumSet<LoadState> - Plugin load states.
Functions
-
auto operator<<(Utility::
Debug& debug, PluginManager:: LoadState value) -> Utility:: Debug& - Debug output operator.
Enum documentation
enum class Corrade:: PluginManager:: LoadState: unsigned short
Plugin load state.
Enumerators | |
---|---|
NotFound |
The plugin cannot be found. Returned by AbstractManager:: |
WrongPluginVersion |
The plugin is build with different version of plugin manager and cannot be loaded. Returned by AbstractManager:: |
WrongInterfaceVersion |
The plugin uses different interface than the interface used by plugin manager and cannot be loaded. Returned by AbstractManager:: |
WrongMetadataFile |
The plugin doesn't have any metadata file or the metadata file contains errors. Returned by AbstractManager:: |
UnresolvedDependency |
The plugin depends on another plugin, which cannot be loaded (e.g. not found or wrong version). Returned by AbstractManager:: |
LoadFailed |
The plugin failed to load for other reason (e.g. linking failure). Returned by AbstractManager:: |
Static |
The plugin is static. Returned by AbstractManager:: |
Loaded |
The plugin is successfully loaded. Returned by AbstractManager:: |
NotLoaded |
The plugin is not loaded. Plugin can be unloaded only if is dynamic and is not required by any other plugin. Returned by AbstractManager:: |
UnloadFailed |
The plugin failed to unload. Returned by AbstractManager:: |
Required |
The plugin cannot be unloaded because another plugin is depending on it. Unload that plugin first and try again. Returned by AbstractManager:: |
Used |
AbstractManager:: |
Typedef documentation
typedef Containers:: EnumSet<LoadState> Corrade:: PluginManager:: LoadStates
Plugin load states.
Useful when checking whether LoadState in in given set of values, for example:
if(loadState & (LoadState::WrongPluginVersion|LoadState::WrongInterfaceVersion)) { // ... }
Note that LoadState::loadState & LoadState::Loaded
instead of much more verbose state & (LoadState::Loaded|LoadState::Static)
.
Function documentation
Utility:: Debug& Corrade:: PluginManager:: operator<<(Utility:: Debug& debug,
PluginManager:: LoadState value)
Debug output operator.