netxsimdg
Loading...
Searching...
No Matches
StructureFactory.hpp
Go to the documentation of this file.
1
8#ifndef STRUCTUREFACTORY_HPP
9#define STRUCTUREFACTORY_HPP
10
12
15
16#include <string>
17
18namespace Nextsim {
19
21public:
27 static ModelState stateFromFile(const std::string& filePath);
28
36 static void fileFromState(const ModelState& state, const ModelMetadata& meta,
37 const std::string& filePath, bool isRestart = false);
38
39 static void finaliseAllFiles();
40
41private:
42 StructureFactory() = default;
43};
44
45} /* namespace Nextsim */
46
47#endif /* CORE_SRC_INCLUDE_STRUCTUREFACTORY_HPP */
static void fileFromState(const ModelState &state, const ModelMetadata &meta, const std::string &filePath, bool isRestart=false)
Takes a ModelState and a template file name to write the state out to a target file path.
static ModelState stateFromFile(const std::string &filePath)
Returns the ModelState of the named restart file.