SORTIE Core C++ Documentation
|
Dead tree class - Version 1.0. More...
#include <DeadTree.h>
Public Member Functions | |
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... | |
deadCode | GetDeadReasonCode () |
Get death reason code of tree. More... | |
void | SetDeadReasonCode (deadCode &iCode) |
Set death reason code of tree. More... | |
clDeadTree * | GetNext () |
Get tree taller than this one. More... | |
Protected Member Functions | |
clDeadTree (int iType, int iSpecies, int iNumFloats, int iNumInts, int iNumStrings, int iNumBools) | |
Constructor. More... | |
~clDeadTree () | |
Destructor. More... | |
Protected Attributes | |
short unsigned int | m_iSpecies |
Species. More... | |
short unsigned int | m_iType |
Type. More... | |
deadCode | m_iDeadCode |
Death reason code. More... | |
float * | mp_fFloatValues |
Array of float data members. More... | |
int * | mp_iIntValues |
Array of integer data members. More... | |
std::string * | mp_sStringValues |
Array of string data members. More... | |
bool * | mp_bBoolValues |
Array of bool data members. More... | |
clDeadTree * | mp_oNext |
Pointer to next tree in linked list of tree population. More... | |
Friends | |
class | clTreePopulation |
class | clGhostTreePopulation |
class | clTree |
Dead tree class - Version 1.0.
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.
Edit history:
--------------—
January 6, 2011 - Created (LEM)
|
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. |
iNumStrings | Number of chars this tree will have. |
iNumBools | Number of bools this tree will have. |
|
protected |
Destructor.
Deletes arrays.
|
inline |
Get death reason code of tree.
|
inline |
Get tree taller than this one.
|
inline |
Get species of tree.
|
inline |
Get type of tree.
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, |
std::string * | p_sValHolder | ||
) |
Gets a string value.
iCode | Data member code. |
p_sValHolder | Variable into which to place the value. |
|
inline |
Set death reason code of tree.
iCode | Code, as a member of whyDead. |
|
friend |
|
friend |
|
friend |
|
protected |
Death reason code.
|
protected |
Species.
|
protected |
Type.
|
protected |
Array of bool data members.
|
protected |
Array of float data members.
|
protected |
Array of integer data members.
|
protected |
Pointer to next tree in linked list of tree population.
|
protected |
Array of string data members.