file
AbstractManager.hClass Corrade::
Namespaces
- namespace Corrade
- Root namespace.
- namespace Corrade::PluginManager
- Plugin management.
Classes
- class Corrade::PluginManager::AbstractManager
- Base for plugin managers.
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.
- auto operator<<(Utility::Debug& debug, PluginManager::LoadStates value) -> Utility::Debug&
- Debug output operator.
Defines
- #define CORRADE_PLUGIN_IMPORT(name)
- Import a static plugin.
- #define CORRADE_PLUGIN_EJECT(name) new in 2019.10
- Eject a previously imported static plugin.
- #define CORRADE_PLUGIN_VERSION
- Plugin version.
- #define CORRADE_PLUGIN_REGISTER(name, className, interface)
- Register a static or dynamic plugin.
Define documentation
#define CORRADE_PLUGIN_IMPORT(name)
Import a static plugin.
Parameters | |
---|---|
name | Static plugin name (the same as defined with CORRADE_ |
If you link static plugins to your executable, they can't automatically register themselves at startup to be known to PluginManager::main()
function. You can also wrap these macro calls in another function (which will then be compiled into a dynamic library or the main executable) and use the CORRADE_
static int corradeZipFilesystemStaticImport() { CORRADE_PLUGIN_IMPORT(ZipFilesystem) return 1; } CORRADE_AUTOMATIC_INITIALIZER(corradeZipFilesystemStaticImport)
Functions called by this macro don't do any dynamic allocation or other operations that could fail, so it's safe to call it even in restricted phases of application execution. It's also safe to call this macro more than once.
#define CORRADE_PLUGIN_EJECT(name) new in 2019.10
Eject a previously imported static plugin.
Parameters | |
---|---|
name | Static plugin name (the same as defined with CORRADE_ |
Deregisters a plugin previously registered using CORRADE_
Functions called by this macro don't do any dynamic allocation or other operations that could fail, so it's safe to call it even in restricted phases of application execution. It's also safe to call this macro more than once.
#define CORRADE_PLUGIN_REGISTER(name, className, interface)
Register a static or dynamic plugin.
Parameters | |
---|---|
name | Name of the static plugin (equivalent of dynamic plugin filename) |
className | Plugin class name |
interface | Interface name (the same as is defined by the pluginInterface() member of given plugin class) |
If the plugin is built as static (using the CMake corrade_CORRADE_STATIC_PLUGIN
preprocessor directive is defined.
If the plugin is built as dynamic (using the CMake corrade_CORRADE_DYNAMIC_PLUGIN
preprocessor directive is defined.
If the plugin is built as dynamic or static library or executable (not as a plugin, using e.g. CMake command add_library()
/ add_executable()
), this macro won't do anything to prevent linker issues when linking more plugins together. No plugin-related preprocessor directive is defined.
See Plugin management for more information about plugin compilation.