ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
WinterBarley.h
Go to the documentation of this file.
1 //
2 // WinterBarley.h
3 //
4 /*
5 
6 Copyright (c) 2003, National Environmental Research Institute, Denmark (NERI)
7 
8 All rights reserved.
9 
10 
11 Redistribution and use in source and binary forms, with or without
12 modification, are permitted provided that the following conditions are met:
13 
14 *) Redistributions of source code must retain the above copyright notice, this
15 list of conditions and the following disclaimer.
16 *) Redistributions in binary form must reproduce the above copyright notice,
17 this list of conditions and the following disclaimer in the documentation
18 and/or other materials provided with the distribution.
19 *) Neither the name of the NERI nor the names of its contributors
20 may be used to endorse or promote products derived from this software without
21 specific prior written permission.
22 
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 POSSIBILITY OF SUCH DAMAGE.
34 
35 */
36 
37 #ifndef WinterBarley_H
38 #define WinterBarley_H
39 
40 #define WBarley_BASE 5900
41 
42 #define WB_DID_SEVEN_ONE m_field->m_user[0]
43 #define WB_DID_SEVEN_TWO m_field->m_user[1]
44 #define WB_DID_SEVEN_THREE m_field->m_user[2]
45 #define WB_DID_SEVEN_FOUR m_field->m_user[3]
46 
47 #define WB_FUNGICIDE_DATE m_field->m_user[4]
48 #define WB_HERBICIDE_DATE m_field->m_user[5]
49 
50 #define WB_DID_EIGHT_ONE m_field->m_user[0]
51 #define WB_DID_EIGHT_TWO m_field->m_user[1]
52 #define WB_DID_EIGHT_THREE m_field->m_user[2]
53 #define WB_DID_EIGHT_FOUR m_field->m_user[3]
54 #define WB_DECIDE_TO_HERB m_field->m_user[4]
55 #define WB_DECIDE_TO_FI m_field->m_user[5]
56 
57 
58 typedef enum {
59  wb_start = 1, // Compulsory, start event must always be 1 (one).
85 // --FN--
86 } WBToDo;
87 
88 
89 
90 class WinterBarley: public Crop
91 {
92 public:
93  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
95  {
96  m_first_date=g_date->DayInYear(15,9);
97  }
98 };
99 
100 #endif // WinterBarley_H
wb_fertslurry_stock_one
Definition: WinterBarley.h:62
wb_fertnpk_plant_one
Definition: WinterBarley.h:69
WinterBarley::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: WinterBarley.cpp:37
WinterBarley
Definition: WinterBarley.h:90
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
wb_water
Definition: WinterBarley.h:79
wb_hay_turning
Definition: WinterBarley.h:82
wb_fertmanganese_plant_one
Definition: WinterBarley.h:67
wb_autumn_harrow
Definition: WinterBarley.h:64
WBarley_BASE
#define WBarley_BASE
Definition: WinterBarley.h:40
wb_growth_reg
Definition: WinterBarley.h:78
wb_fungicide_two
Definition: WinterBarley.h:77
Crop::m_first_date
int m_first_date
Definition: farm.h:540
wb_fungicide_one
Definition: WinterBarley.h:75
Crop
The base class for all crops.
Definition: farm.h:534
WBToDo
WBToDo
Definition: WinterBarley.h:58
wb_hay_bailing
Definition: WinterBarley.h:83
wb_start
Definition: WinterBarley.h:59
wb_switchboard
Definition: WinterBarley.h:76
wb_fertsludge_plant_one
Definition: WinterBarley.h:60
wb_herbicide_one
Definition: WinterBarley.h:66
wb_autumn_plough
Definition: WinterBarley.h:63
wb_fertmanure_stock
Definition: WinterBarley.h:61
wb_herbicide_two
Definition: WinterBarley.h:74
wb_harvest
Definition: WinterBarley.h:81
wb_fertnpk_plant_two
Definition: WinterBarley.h:70
wb_fertslurry_stock_two
Definition: WinterBarley.h:71
Farm
The base class for all farm types.
Definition: farm.h:767
wb_fertmanganese_plant_two
Definition: WinterBarley.h:68
wb_insecticide
Definition: WinterBarley.h:80
wb_stubble_harrowing
Definition: WinterBarley.h:84
WinterBarley::WinterBarley
WinterBarley()
Definition: WinterBarley.h:94
wb_fertnpk_stock_two
Definition: WinterBarley.h:73
wb_autumn_sow
Definition: WinterBarley.h:65
wb_fertnpk_stock_one
Definition: WinterBarley.h:72