LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
event-plant.h
1
10
11#ifndef LDNDC_INPUT_EVENT_PLANT_H_
12#define LDNDC_INPUT_EVENT_PLANT_H_
13
14#include "event/events/eventbase.h"
15
16
17#ifdef __this_event_name
18# undef __this_event_name
19#endif
20#define __this_event_name plant
21
22
23#include "species/speciestypes.h"
24#include "speciesparameters/speciesparameterstypes.h"
25namespace ldndc{
26namespace event{
27
48struct CBM_API __event_attrib_class_name(__this_event_name) : event_attribute_t
49{
50 __event_attrib_class_name(__this_event_name)();
51 ~__event_attrib_class_name(__this_event_name)();
52
54 ldndc::species::species_group_e group;
55
57 std::string type;
59 std::string name;
61 std::string longname;
62
63 std::string location;
64
66 species::species_properties_t * properties;
67 union
68 {
69 species::any_properties_t any;
70 species::crop_properties_t crop;
71 species::grass_properties_t grass;
72 species::wood_properties_t wood;
73 };
74
76 speciesparameters::parameterized_species_t * params;
77};
78class CBM_API __event_class_name(__this_event_name) : public Event
79{
80 EVENT_COMMON_DECL(__this_event_name)
81
82 public:
83 ldndc::species::species_group_e group() const
84 { return this->attribs_->group; }
85
86 char const * species_type() const
87 { return this->attribs_->type.c_str(); }
88 char const * species_name() const
89 { return this->attribs_->name.c_str(); }
90 char const * species_longname() const
91 { return this->attribs_->longname.c_str(); }
92 char const * location() const
93 { return this->attribs_->location.c_str(); }
94
95 species::species_properties_t const * species_properties()
96 const { return this->attribs_->properties; }
97 species::any_properties_t const & any()
98 const { return this->attribs_->any; }
99 species::crop_properties_t const & crop()
100 const { return this->attribs_->crop; }
101 species::grass_properties_t const & grass()
102 const { return this->attribs_->grass; }
103 species::wood_properties_t const & wood()
104 const { return this->attribs_->wood; }
105
106 /* make sure it exists! (e.g. call to params().exists()) */
107 bool speciesparameters_given() const;
108 speciesparameters::speciesparameters_set_t params() const;
109};
110}}
111
112#endif /* !LDNDC_INPUT_EVENT_PLANT_H_ */
113
Spatially explicit groundwater model.
Definition airchemistryput.h:15