ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
SpringBarleyCloverGrass.h
Go to the documentation of this file.
1 //
2 // SpringBarleyCloverGrass.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 
29 #ifndef SpringBarleyCloverGrass_H
30 #define SpringBarleyCloverGrass_H
31 
32 #define SBARLEYCG_BASE 4800
33 #define SBCG_ISAUTUMNPLOUGH m_field->m_user[0]
34 #define SBCG_FERTI_DONE m_field->m_user[1]
35 #define SBCG_SPRAY m_field->m_user[2]
36 
37 typedef enum {
38  sbcg_start = 1, // Compulsory, start event must always be 1 (one).
60 } SBCGToDo;
61 
62 
63 
65 {
66 public:
67  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
69  {
70  m_first_date=g_date->DayInYear(30,11);
71  }
72 };
73 
74 #endif // SpringBarleyCloverGrass_H
SBARLEYCG_BASE
#define SBARLEYCG_BASE
Definition: SpringBarleyCloverGrass.h:32
sbcg_spring_roll
Definition: SpringBarleyCloverGrass.h:46
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
sbcg_fungicide
Definition: SpringBarleyCloverGrass.h:57
sbcg_water1
Definition: SpringBarleyCloverGrass.h:50
sbcg_hay_baling
Definition: SpringBarleyCloverGrass.h:48
Crop::m_first_date
int m_first_date
Definition: farm.h:540
Crop
The base class for all crops.
Definition: farm.h:534
sbcg_herbicide2
Definition: SpringBarleyCloverGrass.h:53
sbcg_ferti_s1
Definition: SpringBarleyCloverGrass.h:39
sbcg_ferti_s2
Definition: SpringBarleyCloverGrass.h:40
sbcg_cattle_is_out
Definition: SpringBarleyCloverGrass.h:59
sbcg_spring_harrow
Definition: SpringBarleyCloverGrass.h:45
sbcg_cattle_out
Definition: SpringBarleyCloverGrass.h:58
sbcg_start
Definition: SpringBarleyCloverGrass.h:38
sbcg_herbicide
Definition: SpringBarleyCloverGrass.h:52
sbcg_ferti_s3
Definition: SpringBarleyCloverGrass.h:41
sbcg_spring_sow
Definition: SpringBarleyCloverGrass.h:47
sbcg_water2
Definition: SpringBarleyCloverGrass.h:51
sbcg_harvest
Definition: SpringBarleyCloverGrass.h:42
SpringBarleyCloverGrass
Definition: SpringBarleyCloverGrass.h:64
Farm
The base class for all farm types.
Definition: farm.h:767
sbcg_GR
Definition: SpringBarleyCloverGrass.h:49
sbcg_spring_plough
Definition: SpringBarleyCloverGrass.h:43
SpringBarleyCloverGrass::SpringBarleyCloverGrass
SpringBarleyCloverGrass()
Definition: SpringBarleyCloverGrass.h:68
SBCGToDo
SBCGToDo
Definition: SpringBarleyCloverGrass.h:37
sbcg_insecticide2
Definition: SpringBarleyCloverGrass.h:55
sbcg_insecticide3
Definition: SpringBarleyCloverGrass.h:56
sbcg_insecticide1
Definition: SpringBarleyCloverGrass.h:54
sbcg_autumn_plough
Definition: SpringBarleyCloverGrass.h:44
SpringBarleyCloverGrass::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyCloverGrass.cpp:45