GCBM
timeseriesidxfromflintdatatransform.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_TIMESERIESIDXFROMFLINTDATATRANSFORM_H_
2 #define MOJA_MODULES_CBM_TIMESERIESIDXFROMFLINTDATATRANSFORM_H_
3 
4 #include "moja/modules/cbm/_modules.cbm_exports.h"
5 
6 #include <moja/flint/itransform.h>
7 
8 namespace moja {
9 
10 namespace datarepository {
11  class IProviderLayer;
12  class TileBlockCellIndexer;
13 }
14 
15 namespace flint {
16  class SpatialLocationInfo;
17 }
18 
19 namespace modules {
20 namespace cbm {
21 
22 class CBM_API TimeSeriesIdxFromFlintDataTransform : public flint::ITransform {
23 public:
25  _lastCellHash = std::numeric_limits<size_t>::max();
26  };
27 
28  void configure(DynamicObject config,
29  const flint::ILandUnitController& landUnitController,
30  datarepository::DataRepository& dataRepository) override;
31 
32  void controllerChanged(const flint::ILandUnitController& controller) override;
33 
34  const DynamicVar& value() const override;
35 
36 private:
37  const flint::ILandUnitController* _landUnitController;
38 
39  mutable std::shared_ptr<const flint::SpatialLocationInfo> _spatialLocationInfo;
40  const datarepository::IProviderLayer* _layer;
41  const datarepository::TileBlockCellIndexer* _providerIndexer;
42 
43  bool _subsame;
46  int _nYears;
47  std::string _origin;
48 
49  mutable DynamicVar _cachedValue;
50  mutable size_t _lastCellHash;
51 };
52 
53 } // namespace cbm
54 } // namespace modules
55 } // namespace moja
56 
57 #endif // MOJA_MODULES_CBM_TIMESERIESIDXFROMFLINTDATATRANSFORM_H_
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_subsame
bool _subsame
Definition: timeseriesidxfromflintdatatransform.h:43
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_layer
const datarepository::IProviderLayer * _layer
Definition: timeseriesidxfromflintdatatransform.h:40
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_providerIndexer
const datarepository::TileBlockCellIndexer * _providerIndexer
Definition: timeseriesidxfromflintdatatransform.h:41
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_startYear
int _startYear
Definition: timeseriesidxfromflintdatatransform.h:44
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_origin
std::string _origin
Definition: timeseriesidxfromflintdatatransform.h:47
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_lastCellHash
size_t _lastCellHash
Definition: timeseriesidxfromflintdatatransform.h:50
moja::flint
Definition: cbmaggregatorcsvwriter.h:19
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform
Definition: timeseriesidxfromflintdatatransform.h:22
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_dataPerYear
int _dataPerYear
Definition: timeseriesidxfromflintdatatransform.h:45
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::TimeSeriesIdxFromFlintDataTransform
TimeSeriesIdxFromFlintDataTransform()
Definition: timeseriesidxfromflintdatatransform.h:24
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_landUnitController
const flint::ILandUnitController * _landUnitController
Definition: timeseriesidxfromflintdatatransform.h:37
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_cachedValue
DynamicVar _cachedValue
Definition: timeseriesidxfromflintdatatransform.h:49
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_nYears
int _nYears
Definition: timeseriesidxfromflintdatatransform.h:46
moja::modules::cbm::TimeSeriesIdxFromFlintDataTransform::_spatialLocationInfo
std::shared_ptr< const flint::SpatialLocationInfo > _spatialLocationInfo
Definition: timeseriesidxfromflintdatatransform.h:39
moja
Definition: ageclasshelper.cpp:10