hydrobricks
Loading...
Searching...
No Matches
Forcing.h
1#ifndef HYDROBRICKS_FORCING_H
2#define HYDROBRICKS_FORCING_H
3
4#include "Includes.h"
5#include "TimeSeriesData.h"
6
7class Forcing {
8 public:
9 explicit Forcing(VariableType type);
10
11 virtual ~Forcing() = default;
12
18 void AttachTimeSeriesData(TimeSeriesData* timeSeriesData);
19
25 VariableType GetType() const {
26 return _type;
27 }
28
35 double GetValue() const;
36
44 void UpdateValue(double value);
45
50 void ResetUpdate();
51
58 [[nodiscard]] bool IsValid() const;
59
66 void Validate() const;
67
68 protected:
69 VariableType _type;
70 TimeSeriesData* _timeSeriesData; // non-owning reference
71 double _updatedValue{0.0};
72 bool _hasUpdatedValue{false};
73};
74
75#endif // HYDROBRICKS_FORCING_H
Definition Forcing.h:7
void Validate() const
Definition Forcing.cpp:43
VariableType GetType() const
Definition Forcing.h:25
bool IsValid() const
Definition Forcing.cpp:27
double GetValue() const
Definition Forcing.cpp:12
void UpdateValue(double value)
Definition Forcing.cpp:18
void AttachTimeSeriesData(TimeSeriesData *timeSeriesData)
Definition Forcing.cpp:7
void ResetUpdate()
Definition Forcing.cpp:23
Definition TimeSeriesData.h:6