|
void | SetValue (short int iCode, int iValue) |
| Sets an integer value. More...
|
|
void | SetValue (short int iCode, float fValue, bool bUpdateNow=true, bool bUpdateAllometry=true) |
| Sets a float value. More...
|
|
void | SetValue (short int iCode, bool bValue) |
| Sets a boolean value. More...
|
|
void | SetValue (short int iCode, std::string sValue) |
| Sets a string value. More...
|
|
void | GetValue (short int iCode, int *p_iValHolder) |
| Gets an integer value. More...
|
|
void | GetValue (short int iCode, float *p_fValHolder) |
| Gets a float value. More...
|
|
void | GetValue (short int iCode, bool *p_bValHolder) |
| Gets a boolean value. More...
|
|
void | GetValue (short int iCode, std::string *p_sValHolder) |
| Gets a string value. More...
|
|
short unsigned int | GetSpecies () |
| Get species of tree. More...
|
|
short unsigned int | GetType () |
| Get type of tree. More...
|
|
clTree * | GetTaller () |
| Get tree taller than this one. More...
|
|
clTree * | GetShorter () |
| Get tree shorter than this one. More...
|
|
clDeadTree * | MakeDeadClone () |
| Makes a dead clone of this tree. More...
|
|
Tree class - Version 1.0.
One object of this class represents one individual tree in the model. The tree is essentially a data structure; the only actions it takes are to communicate changes in its status to the tree population in order to keep itself updated.
The number of data members a tree has is dynamic; very little is defined ahead of time. Species and type are, because these must be known to locate other values.
Trees can't be created or destroyed except by the tree population.
Copyright 2003 Charles D. Canham.
- Author
- Lora E. Murphy
Edit history:
--------------—
October 20, 2011 - Wiped the slate clean for SORTIE 7.0 (LEM)
November 12, 2012 - Chars became strings (LEM)
void clTree::SetValue |
( |
short int |
iCode, |
|
|
float |
fValue, |
|
|
bool |
bUpdateNow = true , |
|
|
bool |
bUpdateAllometry = true |
|
) |
| |
Sets a float value.
If the value being set is a size parameter (height, DBH, etc), the default is for the other parameters to also be updated based on allometric relationships (for instance, if DBH is changed, height will automatically be updated too). If the update causes a tree move to a new life history stage, it will automatically be transitioned. So, if setting a value of either diam10 or height on a seedling causes it to be greater than the seedling height cutoff, the tree will become a sapling and all of its allometric parameters will be recalculated to match the value that was set.
You can override automatic allometry updating. If you do that, be aware that none of the other tree data members will be updated and you will need to do that yourself. Be especially careful when there is a possibility of tree type transition. If the tree is a seedling and you set its height to a value greater than the height cutoff, it will transition, but its diam10 will not change and it will have a DBH value of zero. If the tree is a sapling and you set its DBH to be greater than the minimum adult DBH, it will transition. The setting of any other value will not cause transition. So, if you give a seedling a diam10 value that would, under automatic allometry updating, give it a height greater than the cutoff and cause it to become a sapling, the seedling will not become a sapling unless you explicitly set the height too.
- Parameters
-
iCode | Data member code. |
fValue | Value to set. |
bUpdateNow | Whether or not, if there are allometric changes to make, they need to be performed immediately or can wait (so changes could be grouped). |
bUpdateAllometry | If the change involves allometric changes, whether or not to automatically update the tree's other dimensions. For example, if this is set to false and you are updating a DBH value, tree height will not automatically be re-calculated. |