LandscapeDNDC 1.37.0
Loading...
Searching...
No Matches
event-throw.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_THROW_H_
19#define LDNDC_INPUT_EVENT_THROW_H_
20
21#include "event/events/eventbase.h"
22
23#ifdef __this_event_name
24# undef __this_event_name
25#endif
26#define __this_event_name throw
27
28namespace ldndc{ namespace event{
29struct __event_attrib_class_name(__this_event_name) : event_attribute_t
30{
31 __event_attrib_class_name(__this_event_name)();
32 ~__event_attrib_class_name(__this_event_name)();
33
35
36 /* species name (identifier) */
37 std::string name;
38
40 double reduction_number;
43 bool reduction_number_is_absolute;
45 double reduction_volume;
48 bool reduction_volume_is_absolute;
49
50 /* specify reason of uprooting, breakage, etc.. */
51 std::string reason;
52};
53class __event_class_name(__this_event_name) : public Event
54{
55 /* default constructor, event attribute pointer, ... */
56 EVENT_COMMON_DECL(__this_event_name)
57
58 public:
59 char const * species_name() const
60 { return this->attribs_->name.c_str(); }
61
62 double reduction_number() const
63 { return this->attribs_->reduction_number; }
64 bool reduction_number_is_absolute() const
65 { return this->attribs_->reduction_number_is_absolute; }
66 double reduction_volume() const
67 { return this->attribs_->reduction_volume; }
68 bool reduction_volume_is_absolute() const
69 { return this->attribs_->reduction_volume_is_absolute; }
70
71 std::string const & reason() const
72 { return this->attribs_->reason; }
73};
74}}
75
76#endif /* !LDNDC_INPUT_EVENT_THROW_H_ */
77
Spatially explicit groundwater model.
Definition airchemistryput.h:21