clDeadTree Class Reference

Dead tree class - Version 1.0. More...

#include <DeadTree.h>

List of all members.

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

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 ( 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.

Parameters:
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.


Member Function Documentation

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

Gets an integer value.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
iCode Data member code.
p_cValHolder Variable into which to place the value.

short unsigned int clDeadTree::GetSpecies (  )  [inline]

Get species of tree.

Returns:
Species.

short unsigned int clDeadTree::GetType (  )  [inline]

Get type of tree.

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

deadCode clDeadTree::GetDeadReasonCode (  )  [inline]

Get death reason code of tree.

Returns:
Type, as a member of whyDead.

void clDeadTree::SetDeadReasonCode ( deadCode iCode  )  [inline]

Set death reason code of tree.

Parameters:
iCode Code, as a member of whyDead.

clDeadTree* clDeadTree::GetNext (  )  [inline]

Get tree taller than this one.

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


Friends And Related Function Documentation

friend class clTreePopulation [friend]

friend class clGhostTreePopulation [friend]

friend class clTree [friend]


Member Data Documentation

short unsigned int clDeadTree::m_iSpecies [protected]

Species.

short unsigned int clDeadTree::m_iType [protected]

Type.

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.

Pointer to next tree in linked list of tree population.


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

Generated on Tue Apr 19 13:56:08 2011 for SORTIE Core C++ Documentation by  doxygen 1.5.6