00001
00002
00003 #if !defined(MicroEstablishment_H)
00004 #define MicroEstablishment_H
00005
00006 #include "BehaviorBase.h"
00007
00008 class clTree;
00009 class clGridBase;
00058 class clMicroEstablishment : virtual public clBehaviorBase {
00059
00060
00064 friend class clTestMicroEstablishment;
00065
00066 public:
00067
00073 clMicroEstablishment(clSimManager *p_oSimManager);
00074
00078 ~clMicroEstablishment();
00079
00089 void GetData(xercesc::DOMDocument *p_oDoc);
00090
00106 void Action();
00107
00108 protected:
00109
00111 enum substrateType {mound_scarsoil,
00112 mound_tipup,
00113 mound_freshlogs,
00114 mound_decayedlogs,
00115 mound_fflitter,
00116 mound_ffmoss,
00117 ground_scarsoil,
00118 ground_tipup,
00119 ground_freshlogs,
00120 ground_decayedlogs,
00121 ground_fflitter,
00122 ground_ffmoss,
00123 number_substrates
00125 };
00126
00128 clGridBase *mp_oSubstrateGrid;
00129
00131 clGridBase *mp_oSeedGrid;
00132
00135 short int *mp_iSeedGridCode;
00136
00139 short int *mp_iCounterCodes;
00140
00143 short int *mp_iZCodes;
00144
00146 short int *mp_iIndexes;
00147
00151 short int *mp_iSubstrateCodes;
00152
00154 float m_fMoundProportion;
00156 float m_fMoundHeightMean;
00159 float m_fMoundStandardDeviation;
00162 float m_fFreshLogHeightMean;
00165 float m_fFreshLogStandardDeviation;
00168 float m_fFreshLogA;
00171 float m_fFreshLogB;
00172
00173 int m_iMaxRespiteYears;
00175 int m_iMaxRespiteTimesteps;
00179 short int m_iCohFreshLogCode;
00180
00182 short int m_iCohAgeCode;
00183
00189 void GetParameterFileData(xercesc::DOMDocument *p_oDoc);
00190
00198 void SetupGrids();
00199
00206 void GetTreeDataMemberCodes();
00207
00227 void GetSubstrateProportions(float *p_fSubstrate, const float &fFromX,
00228 const float &fFromY, const float &fToX, const float &fToY);
00229
00267 void GetFreshLogProportions(float *p_fLogs, const float &fFromX, const float &fFromY,
00268 const float &fToX, const float &fToY);
00269
00286 void SetFreshLogZAndRespite(clTree *p_oSeedling, float *p_fFreshLogProportions);
00287
00298 void SetMoundZAndRespite(clTree *p_oSeedling);
00299
00307 void SetGroundZAndRespite(clTree *p_oSeedling);
00308
00309 };
00310
00311 #endif // MicroEstablishment_H