SelectionHarvest.h

00001 //---------------------------------------------------------------------------
00002 
00003 #ifndef SelectionHarvest
00004 #define SelectionHarvest
00005 //---------------------------------------------------------------------------
00006 #include "BehaviorBase.h"
00007 #define NUM_SIZE_CLASSES 4
00008 
00009 class clGridBase;
00010 class clPackage;
00011 class clTree;
00012 class clPopulationBase;
00013 
00054 class clSelectionHarvest : virtual public clBehaviorBase {
00055 
00056  public:
00057 
00063  clSelectionHarvest(clSimManager *p_oSimManager);
00064 
00068  ~clSelectionHarvest();
00069 
00075  void Action();
00076 
00081  void GetTimeSinceHarvest();
00082 
00087  enum cutType {partial,  
00088                gap,      
00089                clear};   
00094  enum amtType {percentBA,   
00095                absBA,       
00096                percentDen,  
00097                absDen};     
00100 protected:
00101 
00102 float  *mp_fLowDBH,  
00103     *mp_fHighDBH, 
00104     *mp_fTargetBA,
00105     *mp_fLandscapeBasalArea, 
00106     *mp_fBasalArea,
00107     *mp_fTempTargetBA; 
00108 float m_fPlotArea, 
00109 m_fTotalBasalArea[][NUM_SIZE_CLASSES], 
00110      m_fBasalAreaDifference[][NUM_SIZE_CLASSES];
00113 clPackage *mp_oOldPackage,     
00114           *mp_oNewPackage;     
00116 clTreePopulation *mp_oPop;   
00173 clGridBase *mp_oMasterCutsGrid,
00174 
00203 *mp_oCutEventsGrid,  
00236 *mp_oResultsGrid,
00237 
00256 *mp_oTimeSinceHarvestGrid;
00257 
00258 
00259 //These hold the return codes for the data members
00260 int m_iInitialAge; 
00261            //"harvestmastercuts" grid data members
00262  short int m_iMasterTimestepCode,   
00263            m_iMasterIDCode,         
00264            *mp_iSpeciesCodes,       
00266            m_iCutTypeCode,          
00267            m_iAmountTypeCode,       
00268            *mp_iRangeMinCodes,      
00270            *mp_iRangeMaxCodes,      
00272            *mp_iRangeAmountCodes,   
00275            //"harvestcutevents" grid data members
00276            m_iCutTimestepCode,      
00277            m_iCutIDCode,            
00279            //"Harvest Results" grid data members
00280            m_iHarvestTypeCode,      
00281            **mp_iDenCutCodes,       
00283            **mp_iBaCutCodes,        
00286  //Other short int variables which are not data member return codes
00287            m_iNumAllowedCutRanges, 
00288            m_iTime, 
00289            m_iNumSpecies; 
00298  void GetData(xercesc::DOMDocument *p_oDoc);
00299 
00312 void GetBasalArea(clTreePopulation *p_oTreePop, float *p_fTotalBasalArea,
00313       float *p_fLoDbh, float *p_fHiDbh);
00314 
00329 void GetBasalArea(clTreePopulation *p_oTreePop, int iSpecies, float *p_fTotalBasalArea, float *p_fLoDbh, float *p_fHiDbh);
00330 
00340 int CalculateBasalAreaDifference(float *p_fCurrentBasalArea);
00341 
00342 
00347 void CreateMasterCutPackage(int iSpecies);
00348 
00356 void EditCutEventsGrid();
00357 
00361  void GetHarvestGrids();
00362 
00371  void ValidatePackages();
00372 
00373 
00374 
00375 };
00376 //---------------------------------------------------------------------------
00377 #endif
00378 

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