ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
FodderGrass.h
Go to the documentation of this file.
1 //
2 // FodderGrass.h
3 //
4 /*
5 *******************************************************************************************************
6 Copyright (c) 2011, Christopher John Topping, University of Aarhus
7 All rights reserved.
8 
9 Redistribution and use in source and binary forms, with or without modification, are permitted provided
10 that the following conditions are met:
11 
12 Redistributions of source code must retain the above copyright notice, this list of conditions and the
13 following disclaimer.
14 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
15 the following disclaimer in the documentation and/or other materials provided with the distribution.
16 
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
18 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
19 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
20 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
22 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 ********************************************************************************************************
26 */
27 
28 #ifndef FodderGrassH
29 #define FodderGrassH
30 
31 #define FG_CUT_DATE m_field->m_user[0]
32 #define FG_WATER_DATE m_field->m_user[1]
33 #define FG_FERTI_DATE m_field->m_user[2]
34 #define FG_FORCE_SECOND_CUT m_field->m_user[3]
35 #define FG_HALT_SECOND_WATER m_field->m_user[4]
36 #define FG_BASE 4330
37 
38 typedef enum {
39  fg_start = 1, // Compulsory, start event must always be 1 (one).
52 
53 
54 class FodderGrass: public Crop
55 {
56 public:
57  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
59  {
60  m_first_date=g_date->DayInYear(30,4);
61  }
62 };
63 
64 #endif
65 // FodderGrass.h
66 
fg_cut_to_silage3
Definition: FodderGrass.h:47
FodderGrass
Definition: FodderGrass.h:54
FG_BASE
#define FG_BASE
Definition: FodderGrass.h:36
fg_ferti_four
Definition: FodderGrass.h:44
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
fg_productapplic_one
Definition: FodderGrass.h:50
fg_water_zero
Definition: FodderGrass.h:48
fg_cut_to_silage2
Definition: FodderGrass.h:46
Crop::m_first_date
int m_first_date
Definition: farm.h:540
fg_ferti_two
Definition: FodderGrass.h:42
fg_water_one
Definition: FodderGrass.h:49
Crop
The base class for all crops.
Definition: farm.h:534
fg_cut_to_silage
Definition: FodderGrass.h:45
FodderGrass::FodderGrass
FodderGrass()
Definition: FodderGrass.h:58
Farm
The base class for all farm types.
Definition: farm.h:767
fg_ferti_zero
Definition: FodderGrass.h:40
fg_ferti_one
Definition: FodderGrass.h:41
FodderGrassToDo
FodderGrassToDo
Definition: FodderGrass.h:38
FodderGrass::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: FodderGrass.cpp:45
fg_start
Definition: FodderGrass.h:39
fg_ferti_three
Definition: FodderGrass.h:43