LightOrg.h

00001 //---------------------------------------------------------------------------
00002 
00003 #ifndef LightOrgH
00004 #define LightOrgH
00005 //---------------------------------------------------------------------------
00006 
00007 #include <xercesc/dom/dom.hpp>
00008 
00009 class clLightBase;
00010 class DOMDocument;
00011 class clSimManager;
00012 class clTreePopulation;
00013 class clTree;
00014 
00048 class clLightOrg {
00049   public:
00050 
00054   ~clLightOrg();
00055 
00061   clLightOrg(clLightBase *p_oHookedShell);
00062 
00069   void DoLightAssignments();
00070 
00085   void DoSetup(clSimManager *p_oSimManager, xercesc::DOMDocument *p_oDoc);
00086 
00096   void DoTreeDataMemberRegistrations(clSimManager *p_oSimManager,
00097     clTreePopulation *p_oPop);
00098 
00100   enum fotocrowndpth {mid, 
00101                       top  
00102                       };
00112   float GetLightExtCoeff(clTree *p_oTree);
00113 
00118   float GetBeamFractionGlobalRadiation() {return m_fBeamFracGlobRad;};
00119 
00124   float GetClearSkyTransmissionCoefficient() {return m_fClearSkyTransCoeff;};
00125 
00130   float GetMaxTreeHeight() {return m_fMaxTreeHeight;};
00131 
00136   enum fotocrowndpth GetPhotoDepth() {return m_iPhotoDepth;};
00137 
00142   int GetFirstDayOfGrowingSeason() {return m_iFirstJulDay;};
00143 
00148   int GetLastDayOfGrowingSeason() {return m_iLastJulDay;};
00149 
00157   clLightBase* GetLightShell(short int iSp, short int iTp)
00158      {return mp_oLightFunctionTable[iSp][iTp];};
00159 
00160   protected:
00161   clTreePopulation *mp_oPop; 
00163   clLightBase ***mp_oLightFunctionTable; 
00167   int m_iTotalSpecies; 
00168   int m_iTotalTypes;   
00170   //
00171   //These are the variables common to all light objects
00172   //
00173 
00174   //Species-specific values - these are in arrays of size = # species and are
00175   //read in from the parameter file.  These must be provided for all species
00176   //whether or not they themselves use light.
00177 
00178   float *mp_fLightExtCoef;
00180   float **mp_fSnagLightExtCoef; 
00184   int *mp_iSnagAgeClasses; 
00191   //Single common values - from the parameter file
00192   float m_fBeamFracGlobRad;    
00194   float m_fClearSkyTransCoeff; 
00196   enum fotocrowndpth m_iPhotoDepth; 
00199   int m_iFirstJulDay;  
00200   int m_iLastJulDay;   
00201   int m_iNumSnagAgeClasses; 
00205   //Single common values - calculated
00206   float m_fMaxTreeHeight; 
00213   short int **mp_iLightCodes;
00214 
00227   void PopulateLightFunctionsTable(clSimManager *p_oSimManager,
00228     clTreePopulation *p_oPop);
00229 
00250   void GetParameterFileData(clSimManager *p_oSimManager, xercesc::DOMDocument *p_oDoc);
00251 };
00252 //---------------------------------------------------------------------------
00253 #endif

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