Loads and owns the lifetime of dynamically-loaded undoApp plugins.
More...
#include <PluginManager.hpp>
|
| int | loadPluginsFromDirectory (const std::string &directory) |
| | Scan a directory for *.so files and load each as a plugin.
|
| |
| bool | loadPlugin (const std::string &path) |
| | Load a single plugin by path.
|
| |
| void | shutdownAll () |
| | Tear down and unload every loaded plugin, in reverse load order.
|
| |
| std::size_t | pluginCount () const |
| | Number of currently loaded plugins.
|
| |
Loads and owns the lifetime of dynamically-loaded undoApp plugins.
◆ PluginManager() [1/2]
| undoStudio::core::PluginManager::PluginManager |
( |
| ) |
|
|
privatedefault |
◆ ~PluginManager()
| undoStudio::core::PluginManager::~PluginManager |
( |
| ) |
|
|
privatedefault |
◆ PluginManager() [2/2]
| undoStudio::core::PluginManager::PluginManager |
( |
const PluginManager & |
| ) |
|
|
privatedelete |
◆ getInstance()
◆ loadPlugin()
| bool undoStudio::core::PluginManager::loadPlugin |
( |
const std::string & |
path | ) |
|
Load a single plugin by path.
- Parameters
-
| path | Path to the shared library |
- Returns
- true on success
◆ loadPluginsFromDirectory()
| int undoStudio::core::PluginManager::loadPluginsFromDirectory |
( |
const std::string & |
directory | ) |
|
Scan a directory for *.so files and load each as a plugin.
- Parameters
-
| directory | Path to scan (relative or absolute) |
- Returns
- Number of plugins successfully loaded
◆ operator=()
◆ pluginCount()
| std::size_t undoStudio::core::PluginManager::pluginCount |
( |
| ) |
const |
|
inline |
Number of currently loaded plugins.
◆ shutdownAll()
| void undoStudio::core::PluginManager::shutdownAll |
( |
| ) |
|
Tear down and unload every loaded plugin, in reverse load order.
Must be called BEFORE ImGuiManager::shutdown(): plugin panels are std::function objects whose code lives inside the plugin's shared library, so ImGuiManager must forget about them before dlclose() unmaps that memory.
◆ m_plugins
| std::vector<LoadedPlugin> undoStudio::core::PluginManager::m_plugins |
|
private |
The documentation for this class was generated from the following files: