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

#include <cbmlandunitdatatransform.h>

Inherits ITransform.

Collaboration diagram for CBMLandUnitDataTransform:
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
 
std::shared_ptr< datarepository::IProviderRelationalInterface > _provider
 
const flint::IVariable * _varToUse
 
std::string _varName
 
DynamicVar _results
 
DynamicObject _resultsObject
 

Member Function Documentation

◆ configure()

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

Configuration Function.

Assign CBMLandUnitDataTransform._landUnitController as parameter landUnitController
, CBMLandUnitDataTransform._dataRepository as dataRepository, CBMLandUnitDataTransform._provider from _dataRepository,
CBMLandUnitDataTransform._varName as value of "variable" in parameter config,
CBMLandUnitDataTransform._varToUse the value of CBMLandUnitDataTransform._varName in CBMLandUnitDataTransform._landUnitController

Parameters
configDynamicObject
landUnitControllerILandUnitController&
dataRepositoryDataRepository&
Returns
void

◆ controllerChanged()

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

Assign CBMLandUnitDataTransform.__landUnitController,
CBMLandUnitDataTransform._varToUse the value of CBMLandUnitDataTransform._varName in CBMLandUnitDataTransform._landUnitController

Parameters
controllerILandUnitController
Returns
void

◆ value()

const DynamicVar & value ( ) const
override

For each row in CBMLandUnitDataTransform._varToUse, set the values of "spatial_unit_id", "landUnitArea", "age", "growth_curve_id", "admin_boundary", "eco_boundary", "climate_time_series_id" in each row to CBMLandUnitDataTransform._resultsObject
Assign CBMLandUnitDataTransform._resultsObject to CBMLandUnitDataTransform._results and return

Returns
DynamicVar&

Member Data Documentation

◆ _dataRepository

datarepository::DataRepository* _dataRepository
private

◆ _landUnitController

const flint::ILandUnitController* _landUnitController
private

◆ _provider

std::shared_ptr<datarepository::IProviderRelationalInterface> _provider
private

◆ _results

DynamicVar _results
mutableprivate

◆ _resultsObject

DynamicObject _resultsObject
mutableprivate

◆ _varName

std::string _varName
private

◆ _varToUse

const flint::IVariable* _varToUse
private

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