GCBM
dynamicgrowthcurvelookuptransform.h
Go to the documentation of this file.
1 #ifndef MOJA_MODULES_CBM_DYNAMICGROWTHCURVELOOKUPTRANSFORM_H_
2 #define MOJA_MODULES_CBM_DYNAMICGROWTHCURVELOOKUPTRANSFORM_H_
3 
4 #include "moja/datarepository/iproviderrelationalinterface.h"
5 #include "moja/flint/ilandunitcontroller.h"
6 #include "moja/flint/itransform.h"
7 
8 #include <Poco/LRUCache.h>
9 #include <Poco/ThreadLocal.h>
10 
11 #include <atomic>
12 #include <map>
13 
14 namespace moja {
15 namespace modules {
16 namespace cbm {
17 
21 class DynamicGrowthCurveLookupTransform : public flint::ITransform {
22 public:
24  std::shared_ptr<std::map<int, std::map<std::string, DynamicVar>>> gcCache
25  ) : _gcCache(gcCache) { }
26 
27  void configure(DynamicObject config,
28  const flint::ILandUnitController& landUnitController,
29  datarepository::DataRepository& dataRepository) override;
30 
31  void controllerChanged(const flint::ILandUnitController& controller) override;
32  const DynamicVar& value() const override;
33 
34 private:
35  const flint::ILandUnitController* _landUnitController;
36  mutable DynamicVar _value;
37  mutable const flint::IVariable* _gcIdVar;
38 
39  mutable std::string _forestTypeFilter;
40  std::shared_ptr<std::map<int, std::map<std::string, DynamicVar>>> _gcCache;
41 };
42 
43 }}}
44 
45 #endif // MOJA_MODULES_CBM_DYNAMICGROWTHCURVELOOKUPTRANSFORM_H_
moja::modules::cbm
Definition: ageclasshelper.cpp:12
moja::modules::cbm::DynamicGrowthCurveLookupTransform
Definition: dynamicgrowthcurvelookuptransform.h:21
moja::modules::cbm::DynamicGrowthCurveLookupTransform::_landUnitController
const flint::ILandUnitController * _landUnitController
Definition: dynamicgrowthcurvelookuptransform.h:35
moja::modules::cbm::DynamicGrowthCurveLookupTransform::_gcIdVar
const flint::IVariable * _gcIdVar
Definition: dynamicgrowthcurvelookuptransform.h:37
moja::modules::cbm::DynamicGrowthCurveLookupTransform::_forestTypeFilter
std::string _forestTypeFilter
Definition: dynamicgrowthcurvelookuptransform.h:39
moja::modules::cbm::DynamicGrowthCurveLookupTransform::value
const DynamicVar & value() const override
Definition: dynamicgrowthcurvelookuptransform.cpp:58
moja::modules::cbm::DynamicGrowthCurveLookupTransform::_value
DynamicVar _value
Definition: dynamicgrowthcurvelookuptransform.h:36
moja::modules::cbm::DynamicGrowthCurveLookupTransform::DynamicGrowthCurveLookupTransform
DynamicGrowthCurveLookupTransform(std::shared_ptr< std::map< int, std::map< std::string, DynamicVar >>> gcCache)
Definition: dynamicgrowthcurvelookuptransform.h:23
moja::modules::cbm::DynamicGrowthCurveLookupTransform::controllerChanged
void controllerChanged(const flint::ILandUnitController &controller) override
Definition: dynamicgrowthcurvelookuptransform.cpp:45
moja::modules::cbm::DynamicGrowthCurveLookupTransform::_gcCache
std::shared_ptr< std::map< int, std::map< std::string, DynamicVar > > > _gcCache
Definition: dynamicgrowthcurvelookuptransform.h:40
moja::modules::cbm::DynamicGrowthCurveLookupTransform::configure
void configure(DynamicObject config, const flint::ILandUnitController &landUnitController, datarepository::DataRepository &dataRepository) override
Definition: dynamicgrowthcurvelookuptransform.cpp:29
moja
Definition: ageclasshelper.cpp:10