netxsimdg
Loading...
Searching...
No Matches
IDevGridIO.hpp
Go to the documentation of this file.
1
8#ifndef IDEVGRIDIO_HPP
9#define IDEVGRIDIO_HPP
10
13
14namespace Nextsim {
15
16class DevGrid;
27public:
28 IDevGridIO(DevGrid& grid)
29 : grid(&grid)
30 {
31 }
32 virtual ~IDevGridIO() = default;
33
39 virtual ModelState getModelState(const std::string& filePath) const = 0;
40
49 virtual void dumpModelState(const ModelState& state, const ModelMetadata& metadata,
50 const std::string& filePath, bool isRestart) const = 0;
51
52protected:
53 DevGrid* grid;
54};
55
56}
57#endif /* IDEVGRIDIO_HPP */
A class to hold a grid of ElementData instances in a fixed sized square grid.
Definition DevGrid.hpp:23
A class that deals with all the netCDF related parts of DevGrid.
virtual ModelState getModelState(const std::string &filePath) const =0
Generates the ModelState based on the data in the given file.
virtual void dumpModelState(const ModelState &state, const ModelMetadata &metadata, const std::string &filePath, bool isRestart) const =0
Dumps the given ModelState to the given file path.