MoCSI API Reference
Loading...
Searching...
No Matches
Functions
SetupRunner.h File Reference
#include <memory>
#include <string>
#include <valarray>
#include "ChainManager.h"
#include "GenericManagingModule.h"
#include "GenericSubmodule.h"
Include dependency graph for SetupRunner.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<typename T >
bool runSetup (std::vector< std::shared_ptr< GenericManagingModule< T > > > all_modules, std::vector< std::shared_ptr< GenericSubmodule< T > > > all_submodules, std::unordered_set< std::string > loaded_managing_modules)
 Function that runs the setup-functions in each module and submodule. This is a bit of a work-around as it would contextually belong to the chain manager, but that would carry problems with its template type, as both classes derived from GenericManagingModule and GenericSubModule need a list of the submodules to insert them into their chains.
 
template<typename T >
std::unordered_set< std::string > getLoadedSubmodules (std::vector< std::shared_ptr< GenericManagingModule< T > > > all_modules, std::vector< std::shared_ptr< GenericSubmodule< T > > > all_submodules, std::unordered_set< std::string > loaded_managing_modules)
 Get the loaded submodules names. These are all the models, that are either requested by a loaded managing module or a requested submodule.
 

Function Documentation

◆ getLoadedSubmodules()

template<typename T >
std::unordered_set< std::string > getLoadedSubmodules ( std::vector< std::shared_ptr< GenericManagingModule< T > > >  all_modules,
std::vector< std::shared_ptr< GenericSubmodule< T > > >  all_submodules,
std::unordered_set< std::string >  loaded_managing_modules 
)

Get the loaded submodules names. These are all the models, that are either requested by a loaded managing module or a requested submodule.

Template Parameters
T
Parameters
all_modulesVector of pointers to all registered managing modules.
all_submodulesVector of pointers to all registered submodules.
loaded_managing_modulesVector of all the requested managing module names.
Returns
std::vector<std::string> containing all the names of the requested submodules.

◆ runSetup()

template<typename T >
bool runSetup ( std::vector< std::shared_ptr< GenericManagingModule< T > > >  all_modules,
std::vector< std::shared_ptr< GenericSubmodule< T > > >  all_submodules,
std::unordered_set< std::string >  loaded_managing_modules 
)

Function that runs the setup-functions in each module and submodule. This is a bit of a work-around as it would contextually belong to the chain manager, but that would carry problems with its template type, as both classes derived from GenericManagingModule and GenericSubModule need a list of the submodules to insert them into their chains.