Inviwo 0.9.12-pre
Inviwo documentation
|
#include <modulemanager.h>
Public Member Functions | |
ModuleManager (InviwoApplication *app) | |
ModuleManager (const ModuleManager &rhs)=delete | |
ModuleManager & | operator= (const ModuleManager &that)=delete |
bool | isRuntimeModuleReloadingEnabled () |
void | registerModules (std::vector< std::unique_ptr< InviwoModuleFactoryObject > > moduleFactories) |
Registers modules from factories and takes ownership of input module factories. Module is registered if dependencies exist and they have correct version. | |
void | registerModules (std::vector< ModuleContainer > moduleFactories) |
void | registerModules (RuntimeModuleLoading, std::function< bool(std::string_view)> filter=ModuleManager::getEnabledFilter()) |
Load modules from dynamic library files in the specified search paths. | |
std::vector< ModuleContainer > | findRuntimeModules (std::span< const std::filesystem::path > searchPaths) |
std::vector< ModuleContainer > | findRuntimeModules (std::span< const std::filesystem::path > searchPaths, std::function< bool(std::string_view)> filter) |
std::vector< ModuleContainer > | findRuntimeModules (std::span< const std::filesystem::path > searchPaths, std::function< bool(std::string_view)> filter, bool runtimeReloading) |
auto | getInviwoModules () |
auto | getInviwoModules () const |
auto | getFactoryObjects () |
size_t | size () const |
template<class T > | |
T * | getModuleByType () const |
InviwoModule * | getModuleByIdentifier (std::string_view identifier) const |
InviwoModule * | getModuleByIndex (size_t index) const |
std::vector< InviwoModule * > | getModulesByAlias (std::string_view alias) const |
InviwoModuleFactoryObject * | getFactoryObject (std::string_view identifier) const |
std::vector< std::string > | findDependentModules (std::string_view module) const |
std::shared_ptr< std::function< void()> > | onModulesDidRegister (std::function< void()> callback) |
Register callback for monitoring when modules have been registered. Invoked in registerModules. | |
std::shared_ptr< std::function< void()> > | onModulesWillUnregister (std::function< void()> callback) |
Register callback for monitoring when modules have been registered. Invoked in unregisterModules. | |
void | reloadModules () |
void | setModuleLocator (std::function< std::filesystem::path(const InviwoModule &)> moduleLocator) |
std::filesystem::path | locateModule (const InviwoModule &) const |
Static Public Member Functions | |
static std::function< bool(std::string_view)> | getEnabledFilter () |
Manages finding, loading, unloading, reloading of Inviwo modules
void inviwo::ModuleManager::registerModules | ( | RuntimeModuleLoading | , |
std::function< bool(std::string_view)> | filter = ModuleManager::getEnabledFilter() ) |
Load modules from dynamic library files in the specified search paths.
Will recursively search for all dll/so/dylib/bundle files in the specified search paths. The library filename must contain "inviwo-module" to be loaded.