netxsimdg
Loading...
Searching...
No Matches
SimpleOutput.hpp
Go to the documentation of this file.
1
8#ifndef SIMPLEOUTPUT_HPP
9#define SIMPLEOUTPUT_HPP
10
12
13namespace Nextsim {
14
16public:
17 SimpleOutput() = default;
18
19 void setFilenamePrefix(const std::string& filePrefix) override { m_filePrefix = filePrefix; }
20
21 void outputState(const ModelMetadata& meta) override;
22
23 // ModelComponent functions
24 std::string getName() const override { return "SimpleOutput"; }
25 // No configuration in getState
26 ModelState getState() const override { return ModelState(); }
27 ModelState getState(const OutputLevel&) const override { return getState(); }
28private:
29 std::string m_filePrefix;
30};
31
32} /* namespace Nextsim */
33
34#endif /* SIMPLEOUTPUT_HPP */
ModelState getState() const override
Returns a ModelState from this component.
void setFilenamePrefix(const std::string &filePrefix) override
Sets the output file name.
void outputState(const ModelMetadata &meta) override
Outputs the passed ModelState.
std::string getName() const override
Returns the name of the component.
ModelState getState(const OutputLevel &) const override
Returns a ModelState from this component at a specified level.