LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
event-plant.h
1/*
2 * SPDX-FileCopyrightText: Karlsruhe Institute of Technology (KIT)
3 * SPDX-License-Identifier: LicenseRef-Crabmeat
4 * This file is part of Crabmeat. Redistribution or commercial use is
5 * prohibited without express written permission. See LICENCE.
6 */
7
17
18#ifndef LDNDC_INPUT_EVENT_PLANT_H_
19#define LDNDC_INPUT_EVENT_PLANT_H_
20
21#include "event/events/eventbase.h"
22
23
24#ifdef __this_event_name
25# undef __this_event_name
26#endif
27#define __this_event_name plant
28
29
30#include "species/speciestypes.h"
31#include "speciesparameters/speciesparameterstypes.h"
32namespace ldndc{
33namespace event{
34
55struct CBM_API __event_attrib_class_name(__this_event_name) : event_attribute_t
56{
57 __event_attrib_class_name(__this_event_name)();
58 ~__event_attrib_class_name(__this_event_name)();
59
61 ldndc::species::species_group_e group;
62
64 std::string type;
66 std::string name;
68 std::string longname;
69
70 std::string location;
71
73 species::species_properties_t * properties;
74 union
75 {
76 species::any_properties_t any;
77 species::crop_properties_t crop;
78 species::grass_properties_t grass;
79 species::wood_properties_t wood;
80 };
81
83 speciesparameters::parameterized_species_t * params;
84};
85class CBM_API __event_class_name(__this_event_name) : public Event
86{
87 EVENT_COMMON_DECL(__this_event_name)
88
89 public:
90 ldndc::species::species_group_e group() const
91 { return this->attribs_->group; }
92
93 char const * species_type() const
94 { return this->attribs_->type.c_str(); }
95 char const * species_name() const
96 { return this->attribs_->name.c_str(); }
97 char const * species_longname() const
98 { return this->attribs_->longname.c_str(); }
99 char const * location() const
100 { return this->attribs_->location.c_str(); }
101
102 species::species_properties_t const * species_properties()
103 const { return this->attribs_->properties; }
104 species::any_properties_t const & any()
105 const { return this->attribs_->any; }
106 species::crop_properties_t const & crop()
107 const { return this->attribs_->crop; }
108 species::grass_properties_t const & grass()
109 const { return this->attribs_->grass; }
110 species::wood_properties_t const & wood()
111 const { return this->attribs_->wood; }
112
113 /* make sure it exists! (e.g. call to params().exists()) */
114 bool speciesparameters_given() const;
115 speciesparameters::speciesparameters_set_t params() const;
116};
117}}
118
119#endif /* !LDNDC_INPUT_EVENT_PLANT_H_ */
120
Spatially explicit groundwater model.
Definition airchemistryput.h:21