ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
SpringBarleyPTreatment.h
Go to the documentation of this file.
1 //
2 // SpringBarleyPTreatment.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 SpringBarleyPTreatment_H
29 #define SpringBarleyPtreatment_H
30 
31 #define SBARLEYPTREATMENT_BASE 30300
32 #define SBPT_SLURRY_DONE m_field->m_user[0]
33 #define SBPT_MANURE_DONE m_field->m_user[1]
34 #define SBPT_SLURRY_EXEC m_field->m_user[2]
35 #define SBPT_MANURE_EXEC m_field->m_user[3]
36 #define SBPT_DID_AUTUMN_PLOUGH m_field->m_user[4]
37 
38 #define SBPT_HERBI_DATE m_field->m_user[0]
39 #define SBPT_GR_DATE m_field->m_user[1]
40 #define SBPT_FUNGI_DATE m_field->m_user[2]
41 #define SBPT_WATER_DATE m_field->m_user[3]
42 #define SBPT_INSECT_DATE m_field->m_user[4]
43 
44 typedef enum {
45  sbpt_start = 1, // Compulsory, start event must always be 1 (one).
72 } SBPTToDo;
73 
74 
75 
77 {
78 public:
79  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
81  {
82  m_first_date=g_date->DayInYear(2,11);
83  }
84 };
85 
86 #endif // SpringBarley_H
sbpt_fertnpk_stock
Definition: SpringBarleyPTreatment.h:55
sbpt_insecticide2
Definition: SpringBarleyPTreatment.h:63
sbpt_stubble_harrow
Definition: SpringBarleyPTreatment.h:71
sbpt_spring_sow
Definition: SpringBarleyPTreatment.h:56
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
sbpt_fertmanure_stock_one
Definition: SpringBarleyPTreatment.h:48
Crop::m_first_date
int m_first_date
Definition: farm.h:540
sbpt_hay_baling
Definition: SpringBarleyPTreatment.h:70
Crop
The base class for all crops.
Definition: farm.h:534
sbpt_straw_chopping
Definition: SpringBarleyPTreatment.h:69
sbpt_fungicide_two
Definition: SpringBarleyPTreatment.h:65
sbpt_insecticide3
Definition: SpringBarleyPTreatment.h:64
SBARLEYPTREATMENT_BASE
#define SBARLEYPTREATMENT_BASE
Definition: SpringBarleyPTreatment.h:31
sbpt_GR
Definition: SpringBarleyPTreatment.h:60
SpringBarleyPTreatment
Definition: SpringBarleyPTreatment.h:76
sbpt_water_one
Definition: SpringBarleyPTreatment.h:66
sbpt_water_two
Definition: SpringBarleyPTreatment.h:67
sbpt_spring_plough
Definition: SpringBarleyPTreatment.h:49
SpringBarleyPTreatment::SpringBarleyPTreatment
SpringBarleyPTreatment()
Definition: SpringBarleyPTreatment.h:80
sbpt_harvest
Definition: SpringBarleyPTreatment.h:68
sbpt_spring_harrow
Definition: SpringBarleyPTreatment.h:50
SBPTToDo
SBPTToDo
Definition: SpringBarleyPTreatment.h:44
SpringBarleyPTreatment::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: SpringBarleyPTreatment.cpp:41
sbpt_herbicide_one
Definition: SpringBarleyPTreatment.h:58
sbpt_herbicide_two
Definition: SpringBarleyPTreatment.h:59
sbpt_fungicide_one
Definition: SpringBarleyPTreatment.h:61
Farm
The base class for all farm types.
Definition: farm.h:767
sbpt_insecticide1
Definition: SpringBarleyPTreatment.h:62
sbpt_fertmanure_stock_two
Definition: SpringBarleyPTreatment.h:54
sbpt_fertlnh3_plant
Definition: SpringBarleyPTreatment.h:52
sbpt_fertpk_plant
Definition: SpringBarleyPTreatment.h:53
sbpt_start
Definition: SpringBarleyPTreatment.h:45
sbpt_spring_roll
Definition: SpringBarleyPTreatment.h:57
sbpt_fertslurry_stock
Definition: SpringBarleyPTreatment.h:47
sbpt_autumn_plough
Definition: SpringBarleyPTreatment.h:46
sbpt_fertmanure_plant
Definition: SpringBarleyPTreatment.h:51