GrowthBase.h

00001 //---------------------------------------------------------------------------
00002 
00003 #ifndef GrowthBaseH
00004 #define GrowthBaseH
00005 //---------------------------------------------------------------------------
00006 #include "BehaviorBase.h"
00007 #include "Constants.h"
00008 
00009 class clSimManager;
00010 class clTree;
00011 class clTreePopulation;
00012 class clGrowthOrg;
00013 class clPlot;
00014 class clAllometry;
00015 
00074 class clGrowthBase : virtual public clBehaviorBase {
00075 //note: need the virtual keyword to avoid base class ambiguity.
00076 
00077   friend class clGrowthOrg;
00078 
00079   public:
00080 
00083   enum growthType {diameter_auto, 
00085                    diameter_only, 
00087                    height_only 
00089                    };
00096   clGrowthBase(clSimManager *p_oSimManager);
00097 
00102   virtual ~clGrowthBase();
00103 
00110   void Action();
00111 
00129   virtual float CalcDiameterGrowthValue(clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth) {return 0;};
00130 
00146   virtual float CalcHeightGrowthValue(clTree *p_oTree, clTreePopulation *p_oPop, float fDiameterGrowth) {return 0;};
00147 
00162   virtual float GetGrowthMemberValue(clTree *p_oTree, float fDiameterGrowth) {return fDiameterGrowth * m_fConvertCmPerTSToMmPerYr;};
00163 
00172   virtual void PreGrowthCalcs( clTreePopulation *p_oPop ){;};
00173 
00179   growthType GetGrowthMethod() {return m_iGrowthMethod;};
00180 
00186   clGrowthOrg* GetGrowthOrg() {return mp_oGrowthOrg;};
00187 
00194   void RegisterTreeDataMembers();
00195 
00196   protected:
00197 
00198   static clGrowthOrg *mp_oGrowthOrg; 
00201   growthType m_iGrowthMethod; 
00204   float m_fConvertCmPerTSToMmPerYr; 
00206   float m_fConvertMmPerYearToCmPerTS; 
00210   bool m_bHooked; 
00222   bool m_bGoLast;
00223 
00233   void GetData(xercesc::DOMDocument *p_oDoc);
00234 
00241   virtual void DoShellSetup(xercesc::DOMDocument *p_oDoc){;};
00242 };
00243 clGrowthOrg *clGrowthBase::mp_oGrowthOrg = NULL;
00244 //---------------------------------------------------------------------------
00245 #endif

Generated on Thu Jan 26 13:44:33 2006 for SORTIE Core C++ Documentation by  doxygen 1.4.6-NO