netxsimdg
Loading...
Searching...
No Matches
ModelMetadata.hpp
Go to the documentation of this file.
1
8
#ifndef MODELMETADATA_HPP
9
#define MODELMETADATA_HPP
10
11
#include "
include/ConfigMap.hpp
"
12
#include "
include/Time.hpp
"
13
14
#include <string>
15
16
namespace
Nextsim {
17
18
class
CommonRestartMetadata;
24
class
ModelMetadata
{
25
public
:
31
inline
void
setTime
(
const
TimePoint
& time) { m_time =
time
; }
37
inline
void
incrementTime
(
const
Duration
& step) { m_time += step; }
39
inline
const
TimePoint
&
time
()
const
{
return
m_time; }
40
42
const
std::string&
structureName
()
const
;
43
49
inline
void
setConfig
(
const
ConfigMap& config) { m_config = config; }
50
51
// The metadata writer should be a friend
52
friend
CommonRestartMetadata
;
53
54
private
:
55
TimePoint
m_time;
56
ConfigMap m_config;
57
};
58
59
}
/* namespace Nextsim */
60
61
#endif
/* MODELMETADATA_HPP */
ConfigMap.hpp
Time.hpp
Nextsim::CommonRestartMetadata
Definition
CommonRestartMetadata.hpp:19
Nextsim::Duration
Definition
Time.hpp:35
Nextsim::ModelMetadata
Definition
ModelMetadata.hpp:24
Nextsim::ModelMetadata::structureName
const std::string & structureName() const
Returns the string description of the model grid structure.
Definition
ModelMetadata.cpp:14
Nextsim::ModelMetadata::incrementTime
void incrementTime(const Duration &step)
Increments the model time metadata value.
Definition
ModelMetadata.hpp:37
Nextsim::ModelMetadata::setConfig
void setConfig(const ConfigMap &config)
Sets the configuration metadata.
Definition
ModelMetadata.hpp:49
Nextsim::ModelMetadata::time
const TimePoint & time() const
Returns the current model time.
Definition
ModelMetadata.hpp:39
Nextsim::ModelMetadata::setTime
void setTime(const TimePoint &time)
Sets the initial or current model time.
Definition
ModelMetadata.hpp:31
Nextsim::TimePoint
Definition
Time.hpp:138
core
src
include
ModelMetadata.hpp
Generated by
1.12.0