LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
event-throw.h
1
10
11#ifndef LDNDC_INPUT_EVENT_THROW_H_
12#define LDNDC_INPUT_EVENT_THROW_H_
13
14#include "event/events/eventbase.h"
15
16#ifdef __this_event_name
17# undef __this_event_name
18#endif
19#define __this_event_name throw
20
21namespace ldndc{ namespace event{
22struct __event_attrib_class_name(__this_event_name) : event_attribute_t
23{
24 __event_attrib_class_name(__this_event_name)();
25 ~__event_attrib_class_name(__this_event_name)();
26
28
29 /* species name (identifier) */
30 std::string name;
31
33 double reduction_number;
36 bool reduction_number_is_absolute;
38 double reduction_volume;
41 bool reduction_volume_is_absolute;
42
43 /* specify reason of uprooting, breakage, etc.. */
44 std::string reason;
45};
46class __event_class_name(__this_event_name) : public Event
47{
48 /* default constructor, event attribute pointer, ... */
49 EVENT_COMMON_DECL(__this_event_name)
50
51 public:
52 char const * species_name() const
53 { return this->attribs_->name.c_str(); }
54
55 double reduction_number() const
56 { return this->attribs_->reduction_number; }
57 bool reduction_number_is_absolute() const
58 { return this->attribs_->reduction_number_is_absolute; }
59 double reduction_volume() const
60 { return this->attribs_->reduction_volume; }
61 bool reduction_volume_is_absolute() const
62 { return this->attribs_->reduction_volume_is_absolute; }
63
64 std::string const & reason() const
65 { return this->attribs_->reason; }
66};
67}}
68
69#endif /* !LDNDC_INPUT_EVENT_THROW_H_ */
70
Spatially explicit groundwater model.
Definition airchemistryput.h:15