GCBM
cbmlandunitdatatransform.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_CBMLANDUNITDATATRANSFORM_H_
2 #define MOJA_MODULES_CBM_CBMLANDUNITDATATRANSFORM_H_
3 
4 #include "moja/flint/itransform.h"
5 #include "moja/datarepository/iproviderrelationalinterface.h"
6 #include "moja/flint/ilandunitcontroller.h"
7 
8 
9 namespace moja {
10 namespace modules {
11 namespace cbm {
12 
13 class CBMLandUnitDataTransform : public flint::ITransform {
14 public:
15  void configure(DynamicObject config,
16  const flint::ILandUnitController& landUnitController,
17  datarepository::DataRepository& dataRepository) override;
18 
19  void controllerChanged(const flint::ILandUnitController& controller) override;
20  const DynamicVar& value() const override;
21 
22 private:
23  const flint::ILandUnitController* _landUnitController;
24  datarepository::DataRepository* _dataRepository;
25  std::shared_ptr<datarepository::IProviderRelationalInterface> _provider;
26  const flint::IVariable* _varToUse;
27  std::string _varName;
28 
29  mutable DynamicVar _results;
30  mutable DynamicObject _resultsObject;
31 };
32 
33 }
34 }
35 }
36 #endif // MOJA_MODULES_CBM_CBMLANDUNITDATATRANSFORM_H_
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::CBMLandUnitDataTransform::_resultsObject
DynamicObject _resultsObject
Definition: cbmlandunitdatatransform.h:30
moja::modules::cbm::CBMLandUnitDataTransform::_varToUse
const flint::IVariable * _varToUse
Definition: cbmlandunitdatatransform.h:26
moja::modules::cbm::CBMLandUnitDataTransform::value
const DynamicVar & value() const override
Definition: cbmlandunitdatatransform.cpp:63
moja::modules::cbm::CBMLandUnitDataTransform::_provider
std::shared_ptr< datarepository::IProviderRelationalInterface > _provider
Definition: cbmlandunitdatatransform.h:25
moja::modules::cbm::CBMLandUnitDataTransform::configure
void configure(DynamicObject config, const flint::ILandUnitController &landUnitController, datarepository::DataRepository &dataRepository) override
Definition: cbmlandunitdatatransform.cpp:27
moja::modules::cbm::CBMLandUnitDataTransform::_landUnitController
const flint::ILandUnitController * _landUnitController
Definition: cbmlandunitdatatransform.h:23
moja::modules::cbm::CBMLandUnitDataTransform::_results
DynamicVar _results
Definition: cbmlandunitdatatransform.h:29
moja::modules::cbm::CBMLandUnitDataTransform
Definition: cbmlandunitdatatransform.h:13
moja::modules::cbm::CBMLandUnitDataTransform::controllerChanged
void controllerChanged(const flint::ILandUnitController &controller) override
Definition: cbmlandunitdatatransform.cpp:51
moja::modules::cbm::CBMLandUnitDataTransform::_varName
std::string _varName
Definition: cbmlandunitdatatransform.h:27
moja::modules::cbm::CBMLandUnitDataTransform::_dataRepository
datarepository::DataRepository * _dataRepository
Definition: cbmlandunitdatatransform.h:24
moja
Definition: ageclasshelper.cpp:10