00001 //--------------------------------------------------------------------------- 00002 #ifndef DisperseBaseH 00003 #define DisperseBaseH 00004 //--------------------------------------------------------------------------- 00005 #include "BehaviorBase.h" 00006 00007 class clGridBase; 00008 class clSimManager; 00009 00022 class clDisperseBase : virtual public clBehaviorBase { 00023 //note: need the virtual keyword to avoid base class ambiguity. 00024 00025 friend class clDisperseOrg; 00026 00027 public: 00028 00032 clDisperseBase(clSimManager *p_oSimManager); 00033 00037 ~clDisperseBase(); 00038 00039 00046 void Action(); 00047 00052 void TimestepCleanup(); 00053 00054 protected: 00055 00056 enum function {weibull, 00057 lognormal 00058 }; 00059 enum cover {gap, 00060 canopy 00061 }; 00062 00063 bool m_bHooked; 00075 void GetData(xercesc::DOMDocument *p_oDoc); 00076 00083 virtual void DoShellSetup(xercesc::DOMDocument *p_oDoc) = 0; 00084 00088 virtual void AddSeeds() = 0; 00089 00090 00091 00093 //Static section 00094 //Just in case there are multiple instances of this object created in one run, 00095 //they can share the seed grid and associated functions for dealing with it. 00097 00098 static clDisperseOrg *mp_oDisperseOrg; 00131 static clGridBase *mp_oSeedGrid; 00132 00133 static float *mp_fDbhForReproduction; 00136 static short int *mp_iNumSeedsCode; 00138 static short int m_iGapCountCode; 00139 static short int m_iIsGapCode; 00140 static short int m_iTotalSpecies; 00147 static bool m_bUpdatedGapStatus; 00148 00150 static bool m_bIsStochastic; 00151 00156 void SetUpBase(); 00157 }; 00158 clGridBase *clDisperseBase::mp_oSeedGrid = NULL; 00159 float *clDisperseBase::mp_fDbhForReproduction = NULL; 00160 short int *clDisperseBase::mp_iNumSeedsCode = NULL; 00161 short int clDisperseBase::m_iTotalSpecies = 0; 00162 short int clDisperseBase::m_iIsGapCode = -1; 00163 short int clDisperseBase::m_iGapCountCode = -1; 00164 bool clDisperseBase::m_bUpdatedGapStatus = false; 00165 clDisperseOrg *clDisperseBase::mp_oDisperseOrg = NULL; 00166 //--------------------------------------------------------------------------- 00167 00168 #endif