11#ifndef LDNDC_INPUT_EVENT_GRAZE_H_
12#define LDNDC_INPUT_EVENT_GRAZE_H_
14#include "event/events/eventbase.h"
17#ifdef __this_event_name
18# undef __this_event_name
20#define __this_event_name graze
25struct CBM_API __event_attrib_class_name(__this_event_name) : event_attribute_t
37 static char const * LIVESTOCK_NAMES[LIVESTOCK_CNT];
39 struct livestock_info_t
42 static livestock_info_t properties_from_type(
49 double excreta_carbon;
51 double excreta_nitrogen;
53 double urine_fraction;
55 static livestock_info_t
const LIVESTOCK_DEFAULTS[LIVESTOCK_CNT];
57 __event_attrib_class_name(__this_event_name)();
58 ~__event_attrib_class_name(__this_event_name)();
61 livestock_type_e type;
64 livestock_info_t properties;
71 double remains_relative;
73class CBM_API __event_class_name(__this_event_name) :
public Event
75 EVENT_COMMON_DECL(__this_event_name)
78 attributes_type::livestock_type_e livestock_type()
const {
return this->attribs_->type; }
79 char const * livestock_name()
82 if ( this->livestock_type() < attributes_type::LIVESTOCK_CNT)
84 return attributes_type::LIVESTOCK_NAMES[this->livestock_type()];
88 attributes_type::livestock_info_t
const & livestock_properties()
const
89 {
return this->attribs_->properties; }
91 double head_count()
const
92 {
return this->attribs_->head_count; }
93 bool have_livestock()
const
94 {
return this->head_count() > 0.0; }
95 double grazing_hours()
const
96 {
return this->attribs_->grazing_hours; }
97 double remains_relative()
const
98 {
return this->attribs_->remains_relative; }
Spatially explicit groundwater model.
Definition airchemistryput.h:15