Template generalized ChainManager. It stores pointers to the modules and runs their exec-function on request. It can store different chains that can be run via passing the name of the chain to the runChain function or specific modules within a chain can be specified via the runSingleModuleInChain function.
More...
#include <ChainManager.h>
|
| | ChainManager () |
| | Constructor of the chain manager without arguments. Does not initialize chains, so the have to be added manually!
|
| |
| | ChainManager (std::string_view chain_type) |
| | Constructor of the chain manager with possibility to specify chain type. Option(s): "global". Initializes the ChainManager with the specified chains belonging to predefined chain types.
|
| |
| void | insertModule (std::string_view key, const std::shared_ptr< ModuleType > &module) |
| | Insert modules into chains. Generates a new chain, if the chain key does not yet exist.
|
| |
| void | runChain (std::string_view key) |
| | Runs the exec-functions of each module within the specified chain (if existing).
|
| |
| void | runSingleModuleInChain (std::string_view chain_key, std::string_view module_key) |
| | Runs the exec-function of a singular specified module within a specified chain (if existing).
|
| |
| void | autoLoader (const ModuleList &all_modules) |
| | Inserts all modules derived from a module type into the chain in the load-order. Only used for modules derived from GenericManagingModules, as only they support auto load functionality.
|
| |
| void | autoLoader (const ModuleList &all_modules, const std::vector< std::string > &modules_to_load) |
| | Inserts only user specified modules derived from a module type into the chain in the load-order. Only used for modules derived from GenericManagingModules, as only they support auto load functionality.
|
| |
| std::vector< std::string > | getChainNames () const |
| | Getter function for the chain names.
|
| |
| std::unordered_set< std::string > | getManagingModuleNames () const |
| | Function that returns the names of the requested/loaded managing modules.
|
| |
| void | resolveDependencies () |
| | Guarantees that the module order is correct to ensure all dependencies are met. Throws a DependencyError, if it detecs missing or circular dependencies. Important: Only call if you know what you are doing.
|
| |
Template generalized ChainManager. It stores pointers to the modules and runs their exec-function on request. It can store different chains that can be run via passing the name of the chain to the runChain function or specific modules within a chain can be specified via the runSingleModuleInChain function.
◆ ChainManager() [1/2]
Constructor of the chain manager without arguments. Does not initialize chains, so the have to be added manually!
◆ ChainManager() [2/2]
Constructor of the chain manager with possibility to specify chain type. Option(s): "global". Initializes the ChainManager with the specified chains belonging to predefined chain types.
◆ autoLoader() [1/2]
Inserts all modules derived from a module type into the chain in the load-order. Only used for modules derived from GenericManagingModules, as only they support auto load functionality.
- Parameters
-
| all_modules | A vector containing pointers to all loaded modules. |
◆ autoLoader() [2/2]
Inserts only user specified modules derived from a module type into the chain in the load-order. Only used for modules derived from GenericManagingModules, as only they support auto load functionality.
- Parameters
-
| all_modules | A vector containing pointers to all loaded modules. |
| modules_to_load | A user provided list of managing modules the user would like to load. |
◆ getChainNames()
Getter function for the chain names.
◆ getManagingModuleNames()
Function that returns the names of the requested/loaded managing modules.
- Template Parameters
-
- Returns
- std::vector<std::string> containing all the names of the requested managing modules.
◆ insertModule()
Insert modules into chains. Generates a new chain, if the chain key does not yet exist.
- Parameters
-
| key | The chain name to insert the module into. |
| module | The pointer to the module to be inserted. |
◆ resolveDependencies()
Guarantees that the module order is correct to ensure all dependencies are met. Throws a DependencyError, if it detecs missing or circular dependencies. Important: Only call if you know what you are doing.
◆ runChain()
Runs the exec-functions of each module within the specified chain (if existing).
- Parameters
-
| key | The name of the chain that will be executed |
◆ runSingleModuleInChain()
Runs the exec-function of a singular specified module within a specified chain (if existing).
- Parameters
-
| chain_key | The name of the chain containing the module that should be executed. |
| module_key | The name of the module to be executed. |
The documentation for this class was generated from the following file: