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

GHOST TREE POPULATION CLASS - Version 1. More...

#include <GhostTreePopulation.h>

Inheritance diagram for clGhostTreePopulation:
clPopulationBase clWorkerBase

Public Member Functions

 ~clGhostTreePopulation ()
 Destructor. More...
 
 clGhostTreePopulation (clSimManager *p_oSimManager)
 Constructor. More...
 
void AddTree (clTree *p_oTree, deadCode iDeadReasonCode)
 Creates a copy of a tree and adds it to this population. More...
 
clDeadTreeGetFirstTree ()
 Gets the first tree in the linked list. More...
 
void GetData (xercesc::DOMDocument *p_oDoc)
 Not needed. More...
 
- Public Member Functions inherited from clPopulationBase
virtual void DoDataUpdates ()
 Performs cleanup between behavior action calls. More...
 
virtual ~clPopulationBase ()
 Destructor. More...
 
 clPopulationBase (clSimManager *p_oSimManager)
 Constructor. More...
 
- Public Member Functions inherited from clWorkerBase
 clWorkerBase (clSimManager *p_oSimManager)
 Constructor. More...
 
virtual ~clWorkerBase ()
 Destructor. More...
 
std::string GetName ()
 Gets the object's namestring. More...
 
clSimManagerGetSimManager ()
 
void DoObjectSetup (xercesc::DOMDocument *p_oDoc, fileType iFileType)
 Triggers the setup process. More...
 
virtual void EndOfRunCleanup ()
 Performs any necessary cleanup operations at the end of a run. More...
 

Protected Member Functions

void TimestepCleanup ()
 Deletes all trees. More...
 
- Protected Member Functions inherited from clWorkerBase
void AssembleFileCode (int iFileType, int iFileVersion, char *cCode)
 Creates the proper identifying filecode for an XML file. More...
 

Protected Attributes

clDeadTreemp_oTrees
 Linked list of dead trees. More...
 
- Protected Attributes inherited from clWorkerBase
std::string m_sNameString
 If a behavior has registered a command line command with the sim manager, this allows it to be called. More...
 
clSimManagermp_oSimManager
 Pointer to the simulation manager object. More...
 
int * mp_iAllowedFileTypes
 List of the input file types this object can handle. More...
 
int m_iNumAllowedTypes
 Number of input file types this object can handle. More...
 

Private Member Functions

 clGhostTreePopulation (const clGhostTreePopulation &oldPop)
 Copy constructor. More...
 

Detailed Description

GHOST TREE POPULATION CLASS - Version 1.

This holds dead trees. They are held for a single timestep then eliminated at the end of the timestep. This holds seedlings through snags. Stumps are not kept.

The trees are not sorted, just held in a simple linked list.

Copyright 2010 Charles D. Canham.

Author
Lora E. Murphy


Edit history:
--------------—
December 21, 2010 - Created (LEM)

Constructor & Destructor Documentation

◆ clGhostTreePopulation() [1/2]

clGhostTreePopulation::clGhostTreePopulation ( const clGhostTreePopulation oldPop)
private

Copy constructor.

Off limits! It's too much to try to copy all the trees, and too dangerous to allow two objects running around with pointers to the same trees.

◆ ~clGhostTreePopulation()

clGhostTreePopulation::~clGhostTreePopulation ( )

Destructor.

◆ clGhostTreePopulation() [2/2]

clGhostTreePopulation::clGhostTreePopulation ( clSimManager p_oSimManager)

Constructor.

Parameters
p_oSimManagerSim Manager object.

Member Function Documentation

◆ AddTree()

void clGhostTreePopulation::AddTree ( clTree p_oTree,
deadCode  iDeadReasonCode 
)

Creates a copy of a tree and adds it to this population.

The original tree is not touched or removed from the old population.

Parameters
p_oTreetree to copy and add.
iDeadReasonCodeWhy the tree died.

◆ GetData()

void clGhostTreePopulation::GetData ( xercesc::DOMDocument *  p_oDoc)
inlinevirtual

Not needed.

Parameters
p_oDocDOM tree of parsed input file.

Implements clWorkerBase.

◆ GetFirstTree()

clDeadTree* clGhostTreePopulation::GetFirstTree ( )
inline

Gets the first tree in the linked list.

Returns
First tree in the list, or NULL if there are no trees.

◆ TimestepCleanup()

void clGhostTreePopulation::TimestepCleanup ( )
protectedvirtual

Deletes all trees.

Reimplemented from clWorkerBase.

Member Data Documentation

◆ mp_oTrees

clDeadTree* clGhostTreePopulation::mp_oTrees
protected

Linked list of dead trees.


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