#include <DeadTree.h>
Public Member Functions | |
void | GetValue (short int iCode, int *p_iValHolder) |
Gets an integer value. | |
void | GetValue (short int iCode, float *p_fValHolder) |
Gets a float value. | |
void | GetValue (short int iCode, bool *p_bValHolder) |
Gets a boolean value. | |
void | GetValue (short int iCode, char *p_cValHolder) |
Gets a char value. | |
short unsigned int | GetSpecies () |
Get species of tree. | |
short unsigned int | GetType () |
Get type of tree. | |
deadCode | GetDeadReasonCode () |
Get death reason code of tree. | |
void | SetDeadReasonCode (deadCode &iCode) |
Set death reason code of tree. | |
clDeadTree * | GetNext () |
Get tree taller than this one. | |
Protected Member Functions | |
clDeadTree (int iType, int iSpecies, int iNumFloats, int iNumInts, int iNumChars, int iNumBools) | |
Constructor. | |
~clDeadTree () | |
Destructor. | |
Protected Attributes | |
short unsigned int | m_iSpecies |
Species. | |
short unsigned int | m_iType |
Type. | |
deadCode | m_iDeadCode |
Death reason code. | |
float * | mp_fFloatValues |
Array of float data members. | |
int * | mp_iIntValues |
Array of integer data members. | |
char ** | mp_cCharValues |
Array of char data members. | |
bool * | mp_bBoolValues |
Array of bool data members. | |
clDeadTree * | mp_oNext |
Pointer to next tree in linked list of tree population. | |
Friends | |
class | clTreePopulation |
class | clGhostTreePopulation |
class | clTree |
One object of this class represents one individual dead 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 2011 Charles D. Canham.
clDeadTree::clDeadTree | ( | int | iType, | |
int | iSpecies, | |||
int | iNumFloats, | |||
int | iNumInts, | |||
int | iNumChars, | |||
int | iNumBools | |||
) | [protected] |
Constructor.
Arrays are sized here. All values will be initialized to 0, empty string, and false.
iType | New tree's type. | |
iSpecies | New tree's species. | |
iNumFloats | Number of floats this tree will have. | |
iNumInts | Number of integers this tree will have. | |
iNumChars | Number of chars this tree will have. | |
iNumBools | Number of bools this tree will have. |
clDeadTree::~clDeadTree | ( | ) | [protected] |
Destructor.
Deletes arrays.
void clDeadTree::GetValue | ( | short int | iCode, | |
int * | p_iValHolder | |||
) |
Gets an integer value.
iCode | Data member code. | |
p_iValHolder | Variable into which to place the value. |
void clDeadTree::GetValue | ( | short int | iCode, | |
float * | p_fValHolder | |||
) |
Gets a float value.
iCode | Data member code. | |
p_fValHolder | Variable into which to place the value. |
void clDeadTree::GetValue | ( | short int | iCode, | |
bool * | p_bValHolder | |||
) |
Gets a boolean value.
iCode | Data member code. | |
p_bValHolder | Variable into which to place the value. |
void clDeadTree::GetValue | ( | short int | iCode, | |
char * | p_cValHolder | |||
) |
Gets a char value.
iCode | Data member code. | |
p_cValHolder | Variable into which to place the value. |
short unsigned int clDeadTree::GetSpecies | ( | ) | [inline] |
Get species of tree.
short unsigned int clDeadTree::GetType | ( | ) | [inline] |
deadCode clDeadTree::GetDeadReasonCode | ( | ) | [inline] |
void clDeadTree::SetDeadReasonCode | ( | deadCode & | iCode | ) | [inline] |
clDeadTree* clDeadTree::GetNext | ( | ) | [inline] |
Get tree taller than this one.
friend class clTreePopulation [friend] |
friend class clGhostTreePopulation [friend] |
friend class clTree [friend] |
short unsigned int clDeadTree::m_iSpecies [protected] |
Species.
short unsigned int clDeadTree::m_iType [protected] |
Type.
deadCode clDeadTree::m_iDeadCode [protected] |
Death reason code.
float* clDeadTree::mp_fFloatValues [protected] |
Array of float data members.
int* clDeadTree::mp_iIntValues [protected] |
Array of integer data members.
char** clDeadTree::mp_cCharValues [protected] |
Array of char data members.
bool* clDeadTree::mp_bBoolValues [protected] |
Array of bool data members.
clDeadTree* clDeadTree::mp_oNext [protected] |
Pointer to next tree in linked list of tree population.