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