SORTIE Core C++ Documentation
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
clDeadTree Class Reference

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...
 
clDeadTreeGetNext ()
 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...
 
clDeadTreemp_oNext
 Pointer to next tree in linked list of tree population. More...
 

Friends

class clTreePopulation
 
class clGhostTreePopulation
 
class clTree
 

Detailed Description

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.

Author
Lora E. Murphy


Edit history:
--------------—
January 6, 2011 - Created (LEM)

Constructor & Destructor Documentation

◆ clDeadTree()

clDeadTree::clDeadTree ( int  iType,
int  iSpecies,
int  iNumFloats,
int  iNumInts,
int  iNumStrings,
int  iNumBools 
)
protected

Constructor.

Arrays are sized here. All values will be initialized to 0, empty string, and false.

Parameters
iTypeNew tree's type.
iSpeciesNew tree's species.
iNumFloatsNumber of floats this tree will have.
iNumIntsNumber of integers this tree will have.
iNumStringsNumber of chars this tree will have.
iNumBoolsNumber of bools this tree will have.

◆ ~clDeadTree()

clDeadTree::~clDeadTree ( )
protected

Destructor.

Deletes arrays.

Member Function Documentation

◆ GetDeadReasonCode()

deadCode clDeadTree::GetDeadReasonCode ( )
inline

Get death reason code of tree.

Returns
Type, as a member of whyDead.

◆ GetNext()

clDeadTree* clDeadTree::GetNext ( )
inline

Get tree taller than this one.

Returns
Next taller tree, or NULL if there isn't one.

◆ GetSpecies()

short unsigned int clDeadTree::GetSpecies ( )
inline

Get species of tree.

Returns
Species.

◆ GetType()

short unsigned int clDeadTree::GetType ( )
inline

Get type of tree.

Returns
Type, as a member of clTreePopulation::iTreeType.

◆ GetValue() [1/4]

void clDeadTree::GetValue ( short int  iCode,
int *  p_iValHolder 
)

Gets an integer value.

Parameters
iCodeData member code.
p_iValHolderVariable into which to place the value.

◆ GetValue() [2/4]

void clDeadTree::GetValue ( short int  iCode,
float *  p_fValHolder 
)

Gets a float value.

Parameters
iCodeData member code.
p_fValHolderVariable into which to place the value.

◆ GetValue() [3/4]

void clDeadTree::GetValue ( short int  iCode,
bool *  p_bValHolder 
)

Gets a boolean value.

Parameters
iCodeData member code.
p_bValHolderVariable into which to place the value.

◆ GetValue() [4/4]

void clDeadTree::GetValue ( short int  iCode,
std::string *  p_sValHolder 
)

Gets a string value.

Parameters
iCodeData member code.
p_sValHolderVariable into which to place the value.

◆ SetDeadReasonCode()

void clDeadTree::SetDeadReasonCode ( deadCode iCode)
inline

Set death reason code of tree.

Parameters
iCodeCode, as a member of whyDead.

Friends And Related Function Documentation

◆ clGhostTreePopulation

friend class clGhostTreePopulation
friend

◆ clTree

friend class clTree
friend

◆ clTreePopulation

friend class clTreePopulation
friend

Member Data Documentation

◆ m_iDeadCode

deadCode clDeadTree::m_iDeadCode
protected

Death reason code.

◆ m_iSpecies

short unsigned int clDeadTree::m_iSpecies
protected

Species.

◆ m_iType

short unsigned int clDeadTree::m_iType
protected

Type.

◆ mp_bBoolValues

bool* clDeadTree::mp_bBoolValues
protected

Array of bool data members.

◆ mp_fFloatValues

float* clDeadTree::mp_fFloatValues
protected

Array of float data members.

◆ mp_iIntValues

int* clDeadTree::mp_iIntValues
protected

Array of integer data members.

◆ mp_oNext

clDeadTree* clDeadTree::mp_oNext
protected

Pointer to next tree in linked list of tree population.

◆ mp_sStringValues

std::string* clDeadTree::mp_sStringValues
protected

Array of string data members.


The documentation for this class was generated from the following file: