Go to the documentation of this file. 1 #ifndef MOJA_MODULES_CBM_FLATRECORD_H_
2 #define MOJA_MODULES_CBM_FLATRECORD_H_
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
5 #include "moja/types.h"
6 #include "moja/flint/record.h"
17 static const std::string BuildClassifierNamesString(
const std::vector<std::string>& classifierNames,
const std::string& suffix =
"");
18 static const std::string BuildClassifierValueString(
const std::vector<Poco::Nullable<std::string>>& classifierValues);
23 FlatFluxRecord(
int year,
const std::vector<Poco::Nullable<std::string>>& classifierValues,
const std::string& landClass,
24 const std::string& ageClass,
const std::vector<Poco::Nullable<std::string>>& previousClassifierValues,
25 const std::string& previousLandClass,
const std::string& previousAgeClass,
26 const Poco::Nullable<std::string>& disturbanceType,
const Poco::Nullable<int>& disturbanceCode,
27 const std::string& srcPool,
const std::string& dstPool,
double flux);
33 std::string header(
const std::vector<std::string>& classifierNames)
const;
34 std::string asPersistable()
const;
35 std::vector<std::optional<std::string>> asVector()
const;
37 void setId(Int64
id) { _id = id; }
38 Int64
getId()
const {
return _id; }
42 mutable size_t _hash = -1;
62 FlatPoolRecord(
int year,
const std::vector<Poco::Nullable<std::string>>& classifierValues,
const std::string& landClass,
63 const std::string& ageClass,
const std::string& pool,
double value);
69 std::string header(
const std::vector<std::string>& classifierNames)
const;
70 std::string asPersistable()
const;
71 std::vector<std::optional<std::string>> asVector()
const;
73 void setId(Int64
id) { _id = id; }
74 Int64
getId()
const {
return _id; }
78 mutable size_t _hash = -1;
92 FlatErrorRecord(
int year,
const std::vector<Poco::Nullable<std::string>>& classifierValues,
93 const std::string& module,
const std::string& error,
double area);
99 std::string header(
const std::vector<std::string>& classifierNames)
const;
100 std::string asPersistable()
const;
101 std::vector<std::optional<std::string>> asVector()
const;
108 mutable size_t _hash = -1;
121 FlatAgeAreaRecord(
int year, std::vector<Poco::Nullable<std::string>>& classifierValues,
122 std::string& landClass, std::string& ageClass,
double area);
128 std::string header(
const std::vector<std::string>& classifierNames)
const;
129 std::string asPersistable()
const;
130 std::vector<std::optional<std::string>> asVector()
const;
140 mutable size_t _hash = -1;
153 FlatDisturbanceRecord(
int year,
const std::vector<Poco::Nullable<std::string>>& classifierValues,
const std::string& landClass,
154 const std::string& ageClass,
const std::vector<Poco::Nullable<std::string>>& previousClassifierValues,
155 const std::string& previousLandClass,
const std::string& previousAgeClass,
156 const std::string& disturbanceType,
int disturbanceCode,
double area);
162 std::string header(
const std::vector<std::string>& classifierNames)
const;
163 std::string asPersistable()
const;
164 std::vector<std::optional<std::string>> asVector()
const;
171 mutable size_t _hash = -1;
189 #endif // MOJA_MODULES_CBM_FLATRECORD_H_
std::string _previousLandClass
Definition: flatrecord.h:51
std::string _ageClass
Definition: flatrecord.h:178
void setId(Int64 id)
Definition: flatrecord.h:73
int getYear() const
Definition: flatrecord.h:105
int _year
Definition: flatrecord.h:46
Poco::Nullable< std::string > _disturbanceType
Definition: flatrecord.h:53
Definition: flatrecord.h:119
Definition: ageclasshelper.cpp:12
Definition: flatrecord.h:21
void setId(Int64 id)
Definition: flatrecord.h:132
const std::vector< Poco::Nullable< std::string > > & getClassifierValues() const
Definition: flatrecord.h:135
Int64 getId() const
Definition: flatrecord.h:104
const std::string & getAgeClass() const
Definition: flatrecord.h:137
int _year
Definition: flatrecord.h:112
std::string _error
Definition: flatrecord.h:115
Definition: flatrecord.h:60
Definition: flatrecord.h:151
~FlatFluxRecord()
Definition: flatrecord.h:29
int getYear() const
Definition: flatrecord.h:39
Int64 getId() const
Definition: flatrecord.h:167
int getYear() const
Definition: flatrecord.h:168
void setId(Int64 id)
Definition: flatrecord.h:103
std::vector< Poco::Nullable< std::string > > _classifierValues
Definition: flatrecord.h:47
Definition: flatrecord.h:90
std::string _dstPool
Definition: flatrecord.h:56
int _year
Definition: flatrecord.h:82
std::string _ageClass
Definition: flatrecord.h:85
std::string _landClass
Definition: flatrecord.h:146
std::vector< Poco::Nullable< std::string > > _classifierValues
Definition: flatrecord.h:176
std::vector< Poco::Nullable< std::string > > _previousClassifierValues
Definition: flatrecord.h:50
double _area
Definition: flatrecord.h:148
Int64 _id
Definition: flatrecord.h:43
std::vector< Poco::Nullable< std::string > > _classifierValues
Definition: flatrecord.h:145
std::string _ageClass
Definition: flatrecord.h:49
double _area
Definition: flatrecord.h:184
std::string _landClass
Definition: flatrecord.h:177
std::string _module
Definition: flatrecord.h:114
Int64 getId() const
Definition: flatrecord.h:133
std::string _disturbanceType
Definition: flatrecord.h:182
int getYear() const
Definition: flatrecord.h:134
std::string _previousAgeClass
Definition: flatrecord.h:52
double _area
Definition: flatrecord.h:116
std::vector< Poco::Nullable< std::string > > _classifierValues
Definition: flatrecord.h:113
double _flux
Definition: flatrecord.h:57
Int64 _id
Definition: flatrecord.h:109
std::vector< Poco::Nullable< std::string > > _previousClassifierValues
Definition: flatrecord.h:179
~FlatAgeAreaRecord()
Definition: flatrecord.h:124
Int64 _id
Definition: flatrecord.h:172
double _value
Definition: flatrecord.h:87
int _year
Definition: flatrecord.h:175
std::vector< Poco::Nullable< std::string > > _classifierValues
Definition: flatrecord.h:83
std::string _landClass
Definition: flatrecord.h:48
int getYear() const
Definition: flatrecord.h:75
std::string _srcPool
Definition: flatrecord.h:55
std::string _landClass
Definition: flatrecord.h:84
std::string _previousLandClass
Definition: flatrecord.h:180
Int64 _id
Definition: flatrecord.h:79
int _disturbanceCode
Definition: flatrecord.h:183
~FlatPoolRecord()
Definition: flatrecord.h:65
void setId(Int64 id)
Definition: flatrecord.h:37
int _year
Definition: flatrecord.h:144
std::string _pool
Definition: flatrecord.h:86
Poco::Nullable< int > _disturbanceCode
Definition: flatrecord.h:54
std::string _previousAgeClass
Definition: flatrecord.h:181
Int64 _id
Definition: flatrecord.h:141
Definition: ageclasshelper.cpp:10
Int64 getId() const
Definition: flatrecord.h:74
Definition: flatrecord.h:15
~FlatDisturbanceRecord()
Definition: flatrecord.h:158
std::string _ageClass
Definition: flatrecord.h:147
~FlatErrorRecord()
Definition: flatrecord.h:95
Int64 getId() const
Definition: flatrecord.h:38
void setId(Int64 id)
Definition: flatrecord.h:166
const std::string & getLandClass() const
Definition: flatrecord.h:136