![]() |
MoCSI API Reference
|
Class which loads snapshot files and writes their data to the inis and fields. Loads any file created with the SnapshotCreator which has "MoCSI_snapshot" as part of its file name. Offers the option to not load simulation config and/or module ini file data. More...
#include <SnapshotLoader.h>

Public Member Functions | |
| SnapshotLoader (SimulationClassBase< T > *sim) | |
| Constructor of the SnapshotLoader. | |
| void | overwriteSimFields (SimulationClassBase< T > *sim) |
| Overwrites the fields in sim with the ones from the snapshot. | |
| void | overwriteIniFiles (SimulationClassBase< T > *sim, std::vector< std::shared_ptr< GenericManagingModule< T > > > &all_modules, std::vector< std::shared_ptr< GenericSubmodule< T > > > &all_submodules) |
| Overwrites the content of the module ini files within each module. Throws an error, if a module that was present in the snapshot is absent in the currently loaded modules. | |
| void | overwriteSimConfig (SimulationClassBase< T > *sim) |
| Overwrite the simulation config data (default.ini + user supplied run ini). | |
Class which loads snapshot files and writes their data to the inis and fields. Loads any file created with the SnapshotCreator which has "MoCSI_snapshot" as part of its file name. Offers the option to not load simulation config and/or module ini file data.
| SnapshotLoader< T >::SnapshotLoader | ( | SimulationClassBase< T > * | sim | ) |
Constructor of the SnapshotLoader.
| sim | The pointer to the sim class, as we need to access the base simulation config. |
| void SnapshotLoader< T >::overwriteIniFiles | ( | SimulationClassBase< T > * | sim, |
| std::vector< std::shared_ptr< GenericManagingModule< T > > > & | all_modules, | ||
| std::vector< std::shared_ptr< GenericSubmodule< T > > > & | all_submodules | ||
| ) |
Overwrites the content of the module ini files within each module. Throws an error, if a module that was present in the snapshot is absent in the currently loaded modules.
| sim | The pointer to the sim class. |
| all_modules | The vector containing the pointers to all loaded modules. |
| all_submodules | The vector containing the pointers to all loaded submodules. |
| void SnapshotLoader< T >::overwriteSimConfig | ( | SimulationClassBase< T > * | sim | ) |
Overwrite the simulation config data (default.ini + user supplied run ini).
| sim | The pointer to the sim class. |
| void SnapshotLoader< T >::overwriteSimFields | ( | SimulationClassBase< T > * | sim | ) |
Overwrites the fields in sim with the ones from the snapshot.
| sim | The pointer to sim class. |