GCBM
Public Member Functions | Private Attributes | List of all members
PeatlandGrowthCurveTransform Class Reference

#include <peatlandgrowthcurvetransform.h>

Inherits ITransform.

Collaboration diagram for PeatlandGrowthCurveTransform:
Collaboration graph

Public Member Functions

void configure (DynamicObject config, const flint::ILandUnitController &landUnitController, datarepository::DataRepository &dataRepository) override
 
void controllerChanged (const flint::ILandUnitController &controller) override
 
const DynamicVar & value () const override
 

Private Attributes

const flint::ILandUnitController * _landUnitController
 
datarepository::DataRepository * _dataRepository
 
const flint::IVariable * _gcbmGrowthCurveVar
 
const flint::IVariable * _blackSpruceGrowthCurveVar
 
DynamicVar _value
 

Member Function Documentation

◆ configure()

void configure ( DynamicObject  config,
const flint::ILandUnitController &  landUnitController,
datarepository::DataRepository &  dataRepository 
)
override

Configuration function

Assign PeatlandGrowthcurve._landUnitController parameter &landUnitController,
PeatlandGrowthcurve._dataRepository parameter &dataRepository,
PeatlandGrowthcurve._gcbmGrowthCurveVar value of config["gcbm_growth_curve_var"] in PeatlandGrowthcurve._landUnitController,
PeatlandGrowthcurve._blackSpruceGrowthCurveVar value of config["black_spruce_growth_curve_var"] in PeatlandGrowthcurve._landUnitController

Parameters
DynamicObjectconfig
flint::ILandUnitController&landUnitController
datarepository::DataRepository&dataRepository
Returns
void

◆ controllerChanged()

void controllerChanged ( const flint::ILandUnitController &  controller)
override

Assign PeatlandGrowthcurve._landUnitController as paramter controller

Parameters
flint::ILandUnitController&controller
Returns
void

◆ value()

const DynamicVar & value ( ) const
override

If the value of variable "peatland_class" in PeatlandGrowthCurveTransform._landUnitController is empty, assign PeatlandGrowthCurveTransform._value the value of PeatlandGrowthCurveTransform._gcbmGrowthCurveVar and return PeatlandGrowthCurveTransform._value

Else if the value of variable "peatland_class" in PeatlandGrowthCurveTransform._landUnitController has the value of either
Peatlands::TREED_PEATLAND_BOG, TREED_PEATLAND_POORFEN, TREED_PEATLAND_RICHFEN or TREED_PEATLAND_SWAMP, indicating it is a treed peatland,
assign PeatlandGrowthCurveTransform._value the value of PeatlandGrowthCurveTransform._blackSpruceGrowthCurveVar and return PeatlandGrowthCurveTransform._value as
Treed peatland is assumed to always be black spruce.

Else if the value of variable "peatland_class" in PeatlandGrowthCurveTransform._landUnitController has the value of either
Peatlands::FOREST_PEATLAND_BOG, FOREST_PEATLAND_POORFEN, FOREST_PEATLAND_RICHFEN or FOREST_PEATLAND_SWAMP, indicating it is a forest peatland,
and PeatlandGrowthCurveTransform._gcbmGrowthCurveVar is empty, assign PeatlandGrowthCurveTransform._value the value of PeatlandGrowthCurveTransform._blackSpruceGrowthCurveVar and return PeatlandGrowthCurveTransform._value as
Forested peatland uses the GCBM growth curve matching the classifier set, if available, otherwise fall back to a default growth curve for the peatland type.

Else, assign PeatlandGrowthCurveTransform._value the value of PeatlandGrowthCurveTransform._gcbmGrowthCurveVar and return PeatlandGrowthCurveTransform._value

Returns
DynamicVar&

Member Data Documentation

◆ _blackSpruceGrowthCurveVar

const flint::IVariable* _blackSpruceGrowthCurveVar
mutableprivate

◆ _dataRepository

datarepository::DataRepository* _dataRepository
private

◆ _gcbmGrowthCurveVar

const flint::IVariable* _gcbmGrowthCurveVar
mutableprivate

◆ _landUnitController

const flint::ILandUnitController* _landUnitController
private

◆ _value

DynamicVar _value
mutableprivate

The documentation for this class was generated from the following files: