-
Notifications
You must be signed in to change notification settings - Fork 1
/
leaf.h
60 lines (56 loc) · 1.95 KB
/
leaf.h
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
#pragma once
#ifndef _LEAF_H_
#define _LEAF_H_
#include "organ.h"
#include "weather.h"
#include "development.h"
class CLeaf: public COrgan
//leaf blade, call it "leaf" for convenience
{
friend class CSheath;
public:
CLeaf();
CLeaf(int rank, CDevelopment * dv); // take current leaf rank and total leaf number to calculate potentialArea
~CLeaf();
bool isInitiated() const {return initiated;}
bool isVisible() const {return appeared;}
bool isMature() const {return mature;}
bool isAging() const {return senescing;}
bool isDead() const {return dead;}
bool isDropped() const {return dropped;}
double get_area() const {return area;}
double get_greenArea() const {return greenArea;}
double get_senescentArea() const {return senescentArea;}
double get_potentialArea() const {return ptnArea;}
double get_length() const {return length;}
double get_potentialLength() const {return ptnLength;}
double get_SLA() const {return SLA;}
double get_GDD2mature() const {return GDD2mature;}
double get_maturity() const;
int get_rank() const {return rank;}
void initialize(CDevelopment * dv);
void set_area(double x) {area=x;}
void set_length(double x) {length=x;}
void set_SLA(double x) {SLA=x;}
void set_GDD2mature(double x) {GDD2mature=x;}
void update(CDevelopment *);
void update_potentials(CDevelopment *);
void senescence(CDevelopment *);
void elongate(CDevelopment *);
private:
CLeaf(const CLeaf&);
bool initiated, appeared, expanding, mature, senescing, dead, dropped;
int rank;
double ptnArea; // potential leaf area
double area; // actual leaf area
double greenArea;
double senescentArea;
double length;
double width;
double SLA;
double plastochrons; // Fournier and Andrieu (1998), used for delay between initiation and elongation
double phase1Delay, phase2Duration, elongAge, elongRate, seneAge, agingArea, GDD2mature ;
double ptnLength, ptnWidth;
double WLRATIO, A_LW; // Area/(L*W)
};
#endif