1#ifndef STATIC_MODULE_CONTAINER_H
2#define STATIC_MODULE_CONTAINER_H
24 static inline std::vector<std::shared_ptr<GenericManagingModule<T>>> m_all_modules{};
25 static inline std::vector<std::shared_ptr<GenericSubmodule<T>>> m_all_submodules{};
29 static inline bool m_modules_created{
false};
44 sim_ptr->m_simulation_config.getStringVectorParameters(
"managing_modules"));
52 m_modules_created =
true;
71 static std::vector<std::shared_ptr<GenericManagingModule<T>>>&
84 return m_all_submodules;
94 const std::string&
key)
103 std::cerr <<
"[StaticModuleContainer]: Requested managing module is not loaded, please "
104 "make sure it was loaded!\n";
105 throw std::runtime_error(
static_cast<std::string
>(
106 "[StaticModuleContainer]: Requested managing module is not loaded, please make "
107 "sure it was loaded!"));
125 std::cerr <<
"[StaticModuleContainer]: Requested submodule is not loaded, please make "
126 "sure it was loaded!\n";
127 throw std::runtime_error(
static_cast<std::string
>(
128 "[StaticModuleContainer]: Requested submodule is not loaded, please make sure it "
Concrete implementation of a matrix class representing a Compressed Sparse Rows (CSR) matrix....
Definition CsrMatrix.h:37
static std::vector< std::shared_ptr< GenericManagingModule< T > > > createAllSelectedManagingModules(SimulationClassBase< T > *sim_pointer, const std::vector< std::string > &list_of_mananging_modules_to_load)
Only creates instances of managing modules that have been specified by the user. (This allows only ha...
Definition ModuleFactory.h:199
static std::vector< std::shared_ptr< GenericSubmodule< T > > > createAllSelectedSubmodules(SimulationClassBase< T > *sim_pointer, const std::vector< std::shared_ptr< GenericManagingModule< T > > > &loaded_managing_modules)
Only creates submodules that are used within the simulation. Iteratively requests the submodule list ...
Definition ModuleFactory.h:228
static std::vector< std::shared_ptr< GenericManagingModule< T > > > createAllManagingModules(SimulationClassBase< T > *sim_pointer)
Creates every module in the module registry.
Definition ModuleFactory.h:157
Class that creates all modules and allows access to the module pointers in static contexts....
Definition StaticModuleContainer.h:22
static std::vector< std::shared_ptr< GenericSubmodule< T > > > & getAllSelectedSubmodules()
Get all selected submodules (static).
Definition StaticModuleContainer.h:82
static std::shared_ptr< GenericManagingModule< T > > getSelectedManagingModule(const std::string &key)
Get a specified managing module.
Definition StaticModuleContainer.h:93
StaticModuleContainer(SimulationClassBase< T > *sim_ptr)
Construct a new Static Module Container object. Also creates all modules (all selected modules as soo...
Definition StaticModuleContainer.h:38
static std::vector< std::shared_ptr< GenericManagingModule< T > > > & getAllSelectedManagingModules()
Get all selected managing modules (static).
Definition StaticModuleContainer.h:72
static std::shared_ptr< GenericSubmodule< T > > getSelectedSubmodule(const std::string &key)
Get the specified submodule.
Definition StaticModuleContainer.h:116
static bool isInitialized()
Getter function for the m_modules_created boolean. Is set to true, if this module has been created (o...
Definition StaticModuleContainer.h:63