Skip to content

Commit efe7fcc

Browse files
author
Max Fellows
committed
Made FlatRecord extensible.
1 parent 42ee951 commit efe7fcc

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • Source/moja.modules.cbm/include/moja/modules/cbm

Source/moja.modules.cbm/include/moja/modules/cbm/flatrecord.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace cbm {
2626
const Poco::Nullable<std::string>& disturbanceType, const Poco::Nullable<int>& disturbanceCode,
2727
const std::string& srcPool, const std::string& dstPool, double flux);
2828

29-
~FlatFluxRecord() {}
29+
virtual ~FlatFluxRecord() {};
3030

3131
bool operator==(const FlatFluxRecord& other) const;
3232
size_t hash() const;
@@ -38,7 +38,7 @@ namespace cbm {
3838
Int64 getId() const { return _id; }
3939
int getYear() const { return _year; }
4040

41-
private:
41+
protected:
4242
mutable size_t _hash = -1;
4343
Int64 _id;
4444

@@ -62,7 +62,7 @@ namespace cbm {
6262
FlatPoolRecord(int year, const std::vector<Poco::Nullable<std::string>>& classifierValues, const std::string& landClass,
6363
const std::string& ageClass, const std::string& pool, double value);
6464

65-
~FlatPoolRecord() {}
65+
virtual ~FlatPoolRecord() {}
6666

6767
bool operator==(const FlatPoolRecord& other) const;
6868
size_t hash() const;
@@ -74,7 +74,7 @@ namespace cbm {
7474
Int64 getId() const { return _id; }
7575
int getYear() const { return _year; }
7676

77-
private:
77+
protected:
7878
mutable size_t _hash = -1;
7979
Int64 _id;
8080

@@ -92,7 +92,7 @@ namespace cbm {
9292
FlatErrorRecord(int year, const std::vector<Poco::Nullable<std::string>>& classifierValues,
9393
const std::string& module, const std::string& error, double area);
9494

95-
~FlatErrorRecord() {};
95+
virtual ~FlatErrorRecord() {};
9696

9797
bool operator==(const FlatErrorRecord& other) const;
9898
size_t hash() const;
@@ -104,7 +104,7 @@ namespace cbm {
104104
Int64 getId() const { return _id; }
105105
int getYear() const { return _year; }
106106

107-
private:
107+
protected:
108108
mutable size_t _hash = -1;
109109
Int64 _id;
110110

@@ -121,7 +121,7 @@ namespace cbm {
121121
FlatAgeAreaRecord(int year, std::vector<Poco::Nullable<std::string>>& classifierValues,
122122
std::string& landClass, std::string& ageClass, double area);
123123

124-
~FlatAgeAreaRecord() {}
124+
virtual ~FlatAgeAreaRecord() {}
125125

126126
bool operator==(const FlatAgeAreaRecord& other) const;
127127
size_t hash() const;
@@ -136,7 +136,7 @@ namespace cbm {
136136
const std::string& getLandClass() const { return _landClass; }
137137
const std::string& getAgeClass() const { return _ageClass; }
138138

139-
private:
139+
protected:
140140
mutable size_t _hash = -1;
141141
Int64 _id;
142142

@@ -155,7 +155,7 @@ namespace cbm {
155155
const std::string& previousLandClass, const std::string& previousAgeClass,
156156
const std::string& disturbanceType, int disturbanceCode, double area);
157157

158-
~FlatDisturbanceRecord() {}
158+
virtual ~FlatDisturbanceRecord() {}
159159

160160
bool operator==(const FlatDisturbanceRecord& other) const;
161161
size_t hash() const;
@@ -167,7 +167,7 @@ namespace cbm {
167167
Int64 getId() const { return _id; }
168168
int getYear() const { return _year; }
169169

170-
private:
170+
protected:
171171
mutable size_t _hash = -1;
172172
Int64 _id;
173173

0 commit comments

Comments
 (0)