-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathGhostTreePopulation.h
More file actions
92 lines (74 loc) · 2.14 KB
/
GhostTreePopulation.h
File metadata and controls
92 lines (74 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#ifndef GhostTreePopulationH
#define GhostTreePopulationH
#include "PopulationBase.h"
#include "Constants.h"
#include "DeadTree.h"
class clTree;
class clDeadTree;
using namespace whyDead;
/**
* 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
*
* <br>Edit history:
* <br>-----------------
* <br>December 21, 2010 - Created (LEM)
*/
class clGhostTreePopulation : public clPopulationBase {
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(const clGhostTreePopulation &oldPop);
public:
/**
* Destructor.
*/
~clGhostTreePopulation();
/**
* Constructor.
*
* @param p_oSimManager Sim Manager object.
*/
clGhostTreePopulation(clSimManager *p_oSimManager);
/**
* Creates a copy of a tree and adds it to this population. The original tree
* is not touched or removed from the old population.
*
* @param p_oTree tree to copy and add.
* @param iDeadReasonCode Why the tree died.
*/
void AddTree(clTree *p_oTree, deadCode iDeadReasonCode);
/**
* Gets the first tree in the linked list.
* @return First tree in the list, or NULL if there are no trees.
*/
clDeadTree* GetFirstTree() {return mp_oTrees;};
/**
* Not needed.
* @param p_oDoc DOM tree of parsed input file.
*/
void GetData(xercesc::DOMDocument *p_oDoc) {;};
///////////////////////////////////////////////////////////////////////////
// PROTECTED
///////////////////////////////////////////////////////////////////////////
protected:
/**
* Deletes all trees.
*/
void TimestepCleanup();
/** Linked list of dead trees */
clDeadTree *mp_oTrees;
}; //end of class GhostTreePopulation
//----------------------------------------------------------------------------
#endif