#include <MortalityBase.h>
Inheritance diagram for clMortalityBase:
Public Member Functions | |
clMortalityBase (clSimManager *p_oSimManager) | |
Constructor. | |
virtual | ~clMortalityBase () |
Destructor. | |
void | Action () |
Performs mortality calculations. | |
virtual bool | DoMort (clTree *p_oTree, const float &fDbh, const short int &iSpecies)=0 |
Determines whether or not a tree dies. | |
clMortalityOrg * | GetMortOrg () |
Gets the mortality org object. | |
void | RegisterTreeDataMembers () |
Triggers the mortality data member registrations. | |
short int | GetNewTreeBools () |
Overridden from clBehaviorBase. | |
bool | UsesThisMortality (short int iSp, short int iTp) |
Whether or not a species/type combo uses this mortality object. | |
virtual void | PreMortCalcs (clTreePopulation *p_oPop) |
Performs calculations before any trees have been killed. | |
Protected Member Functions | |
void | GetData (xercesc::DOMDocument *p_oDoc) |
Triggers all mortality setup. | |
void | PopulateUsesThisMortality () |
Declares and populates the mp_bUsesThisMortality array. | |
virtual void | DoShellSetup (xercesc::DOMDocument *p_oDoc) |
If a descendent class has specific setup needs, it can overload this function. | |
Protected Attributes | |
short int | m_iNumTotalSpecies |
Keep a copy for the constructor. | |
bool | m_bHooked |
Whether or not this shell object is hooked to clMortalityOrg. | |
bool ** | mp_bUsesThisMortality |
2D array, species by type, of whether or not this mortality shell applies to a given species/type combo. | |
Static Protected Attributes | |
static clMortalityOrg * | mp_oMortalityOrg |
clMortalityOrg object. | |
Friends | |
class | clMortalityOrg |
This is the base class for mortality behavior shell classes. These shells each evaluate different kinds mortality for a tree.
The bulk of the organizational work is done by the class clMortalityOrg, which calls the needed shell functions for each tree. The clMortalityOrg object hooks into one particular growth shell object, which calls clMortalityOrg when it is triggered by the behavior manager. It does not particularly matter which shell object is hooked; the first one will suffice. Any non-hooked shells do nothing when their Action() and other functions are called.
Every object made from this class or a descendent class must have the string "mortshell" in its namestring somewhere.
Copyright 2003 Charles D. Canham.
|
Constructor. Checks to see if the mortality org object has been created - if not, it creates it.
|
|
Destructor. Deletes the growth org object if it was the hooked object. |
|
Performs mortality calculations. This will be the same for all descendent classes - they do not need to override. If a particular object is hooked, it calls the growth org object's DoGrowthAssignments. Otherwise it does nothing. Reimplemented from clBehaviorBase. |
|
Determines whether or not a tree dies. This must be overridden by all child classes.
Implemented in clBCMort, clCompetitionMort, clDensitySelfThinning, clGMFMort, clHeightGLIWeibullMortality, clLogisticBiLevelMortality, clNCIMort, clResourceMortality, clSelfThinMort, clSenescence, clStochasticBiLevelMortality, clStochasticMort, and clWeibullSnagMort. |
|
If a descendent class has specific setup needs, it can overload this function.
Reimplemented in clBCMort, clCompetitionMort, clDensitySelfThinning, clGMFMort, clHeightGLIWeibullMortality, clLogisticBiLevelMortality, clNCIMort, clResourceMortality, clSelfThinMort, clSenescence, clStochasticBiLevelMortality, clStochasticMort, and clWeibullSnagMort. |
|
Triggers all mortality setup. This will be the same for all descendent classes. If a particular object is hooked, it calls the growth org object's DoSetup() function, which calls the function DoShellSetup() - if a descendent class has specific setup needs, it can overload that function.
Implements clWorkerBase. |
|
Gets the mortality org object.
|
|
Overridden from clBehaviorBase. We want to register one bool data member for each species/type combo that is applied to mortality. If this is a hooked object, this calls clMortalityOrg::UpdateDataMemberRegistrations(). Hooked or not, it then returns m_iNewTreeBools as usual.
Reimplemented from clBehaviorBase. Reimplemented in clNCIMort. |
|
Performs calculations before any trees have been killed. Override this function to perform some processing before any mortality has been applied. There are no guarantees as to what order the behaviors will be called for this function, but it is guaranteed that no trees will have been killed for mortality. To make this guarantee worth something, DO NOT KILL ANY TREES in this function! Reimplemented in clNCIMort. |
|
Triggers the mortality data member registrations. If this is the hooked mortality object, then clMortalityOrg::DoDataMemberRegistrations is called. Reimplemented from clBehaviorBase. Reimplemented in clNCIMort. |
|
Whether or not a species/type combo uses this mortality object.
|
|
Whether or not this shell object is hooked to clMortalityOrg. clMortalityOrg will set this flag. |
|
clMortalityOrg object. This pointer is held in common by all shells. |