![]() |
NDEVR
API Documentation
|
Logic for the program-wide storage and execution of Modules. More...
Static Public Member Functions | |
| static void | AddModule (const File &module_file) |
| Adds a single module by loading it from the specified library file. | |
| static void | AddModule (const Module &module) |
| Registers a pre-constructed Module into the module system. | |
| static void | CallModuleFunction (const StringView &function) |
| Invokes a named hook function on all registered modules. | |
| static void | CallModuleFunction (const StringView &function, QTModelManager *model_manager, QTWindowManager *window_manager) |
| Invokes a named UI hook function on all registered modules. | |
| static void | DefineModuleResources (const StringView &module_name, ModuleResourceManager *resources) |
| Asks a specific module to declare its required resources. | |
| static void | FindModules (const Buffer< String > &module_list, const File &module_folder) |
| Discovers and loads modules from an explicit list of names within the given folder. | |
| static void | FindModules (const File &module_folder) |
| Discovers and loads all modules found in the given folder. | |
| static void | FindModules (const File &module_list, const File &module_folder) |
| Discovers and loads modules listed in a ModuleList file within the given folder. | |
| static bool | HasActiveModule (const StringView &module_name) |
| Checks whether a module with the given name exists and is active. | |
| static bool | IsInitialized () |
| Checks whether the module system has completed its initial setup sequence. | |
| static bool | IsModuleActive (const StringView &module_name) |
| Checks whether a specific module is currently marked as active. | |
| static void * | LoadDynamicLibrary (const StringView &library) |
| Loads a dynamic library by name or path and returns an opaque handle. | |
| static void * | LoadFromDynamicLibrary (const StringView &library, const StringView &function) |
| Loads a dynamic library and resolves a function symbol from it in one step. | |
| static void * | LoadFromDynamicLibrary (void *library, const StringView &function) |
| Resolves a function symbol from a previously loaded dynamic library. | |
| static File | MainModuleFolder () |
| Returns the primary folder where module libraries are located. | |
| static void | OnExit () |
| Invokes the exit cleanup hook on all modules and releases resources. | |
| static void | ReadModuleSettings () |
| Reads module active/inactive states from persistent settings storage. | |
| static void | SaveModuleSettings () |
| Persists the current module active/inactive states to settings storage. | |
| static void | SetErrorCallback (const std::function< void(const Exception &e)> &callback) |
| Sets a callback to be invoked when a module hook function throws an exception. | |
| static void | SetInitialized (QTModelManager *model_manager, QTWindowManager *window_manager) |
| Marks the module system as fully initialized and stores the manager pointers for use when late-loaded modules need to run SetupUIForNDEVR. | |
| static void | SetMainProgramModuleName (const StringView &name) |
| Sets the name of the main program module used as the application entry-point. | |
| static void | SetupModuleRegistration () |
| Runs the registration setup hook on all modules to configure licensing. | |
Static Public Attributes | |
| static Dictionary< String, Dictionary< String, void * > > | functions |
| Cached map of library names to their resolved function tables. | |
| static String | main_program_module_name |
| The name of the module designated as the main application entry-point. | |
| static Dictionary< String, bool > | module_active_list |
| Map of module names to their active/inactive state. | |
| static Dictionary< String, Module > | modules |
| Map of module names to their Module instances. | |
| static Buffer< String > | ordered_modules |
| Module names in their load/execution order. | |
Logic for the program-wide storage and execution of Modules.
Called in software setup to allow modules to perform actions to modify or enhance the software.
Definition at line 155 of file ModuleManager.h.
|
static |
Adds a single module by loading it from the specified library file.
| [in] | module_file | The dynamic library file to load as a module. |
|
static |
Registers a pre-constructed Module into the module system.
| [in] | module | The module to add. |
|
static |
Invokes a named hook function on all registered modules.
| [in] | function | The name of the hook function to call. |
|
static |
Invokes a named UI hook function on all registered modules.
| [in] | function | The name of the hook function to call. |
| [in] | model_manager | The application model manager. |
| [in] | window_manager | The application window manager. |
|
static |
Asks a specific module to declare its required resources.
| [in] | module_name | The internal name of the module. |
| [in] | resources | The resource manager to populate. |
|
static |
Discovers and loads modules from an explicit list of names within the given folder.
| [in] | module_list | A buffer of module names to load. |
| [in] | module_folder | The directory containing the module libraries. |
|
static |
Discovers and loads all modules found in the given folder.
| [in] | module_folder | The directory to scan for module libraries. |
Discovers and loads modules listed in a ModuleList file within the given folder.
| [in] | module_list | A file containing one module name per line. |
| [in] | module_folder | The directory containing the module libraries. |
|
static |
Checks whether a module with the given name exists and is active.
| [in] | module_name | The internal name of the module. |
|
static |
Checks whether the module system has completed its initial setup sequence.
|
static |
Checks whether a specific module is currently marked as active.
| [in] | module_name | The internal name of the module. |
|
static |
Loads a dynamic library by name or path and returns an opaque handle.
| [in] | library | The name or path of the dynamic library to load. |
|
static |
Loads a dynamic library and resolves a function symbol from it in one step.
| [in] | library | The name or path of the dynamic library. |
| [in] | function | The name of the function to resolve. |
|
static |
Resolves a function symbol from a previously loaded dynamic library.
| [in] | library | An opaque handle returned by LoadDynamicLibrary. |
| [in] | function | The name of the function to resolve. |
|
static |
Returns the primary folder where module libraries are located.
|
static |
Sets a callback to be invoked when a module hook function throws an exception.
| [in] | callback | The error handler function. |
|
static |
Marks the module system as fully initialized and stores the manager pointers for use when late-loaded modules need to run SetupUIForNDEVR.
| [in] | model_manager | The application model manager. |
| [in] | window_manager | The application window manager. |
|
static |
Sets the name of the main program module used as the application entry-point.
| [in] | name | The internal name of the main program module. |