netxsimdg
Loading...
Searching...
No Matches
StructureFactory.hpp
Go to the documentation of this file.
1
8
#ifndef STRUCTUREFACTORY_HPP
9
#define STRUCTUREFACTORY_HPP
10
11
#include "
include/IStructure.hpp
"
12
13
#include "
include/ModelMetadata.hpp
"
14
#include "
include/ModelState.hpp
"
15
16
#include <string>
17
18
namespace
Nextsim {
19
20
class
StructureFactory
{
21
public
:
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
41
private
:
42
StructureFactory
() =
default
;
43
};
44
45
}
/* namespace Nextsim */
46
47
#endif
/* CORE_SRC_INCLUDE_STRUCTUREFACTORY_HPP */
IStructure.hpp
ModelMetadata.hpp
ModelState.hpp
Nextsim::ModelMetadata
Definition
ModelMetadata.hpp:24
Nextsim::StructureFactory
Definition
StructureFactory.hpp:20
Nextsim::StructureFactory::fileFromState
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.
Definition
StructureFactory.cpp:72
Nextsim::StructureFactory::stateFromFile
static ModelState stateFromFile(const std::string &filePath)
Returns the ModelState of the named restart file.
Definition
StructureFactory.cpp:44
Nextsim::ModelState
Definition
ModelState.hpp:20
core
src
include
StructureFactory.hpp
Generated by
1.12.0