ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
winterrape.h
Go to the documentation of this file.
1 //
2 // winterrape.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 WINTERRAPE_H
38 #define WINTERRAPE_H
39 
40 // <cropname>_BASE is the first event number to be dumped into the
41 // debugging log from this crop. *Must* be unique among all crops.
42 // I suggest steps of 100 between crops.
43 
44 #define WINTERRAPE_BASE 300
45 #define WR_DID_RC_CLEAN m_field->m_user[0]
46 #define WR_DID_HERBI_ZERO m_field->m_user[1]
47 #define WR_INSECT_DATE m_field->m_user[2]
48 #define WR_FUNGI_DATE m_field->m_user[3]
49 #define WR_SWARTH_DATE m_field->m_user[4]
50 #define WR_HARVEST_DATE m_field->m_user[5]
51 
52 typedef enum {
53  wr_start = 1, // Compulsory, start event must always be 1 (one).
79 
80 
81 
82 class WinterRape: public Crop
83 {
84  // Private methods corresponding to the different management steps
85  // (when needed).
86  void HerbiZero( void );
87  void RowcolOne( void );
88 
89 public:
90  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
92  {
93  m_first_date=g_date->DayInYear(24,8);
94  }
95 };
96 
97 #endif // WINTERRAPE_H
wr_swarth
Definition: winterrape.h:71
wr_ferti_p1
Definition: winterrape.h:60
wr_productapplic_one
Definition: winterrape.h:77
wr_ferti_s2
Definition: winterrape.h:63
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
wr_ferti_s1
Definition: winterrape.h:62
wr_insect_one_c
Definition: winterrape.h:70
WinterRape::RowcolOne
void RowcolOne(void)
Definition: winterrape.cpp:578
wr_start
Definition: winterrape.h:53
wr_herbi_zero
Definition: winterrape.h:59
Crop::m_first_date
int m_first_date
Definition: farm.h:540
wr_rowcol_clean
Definition: winterrape.h:58
WinterRape
Definition: winterrape.h:82
Crop
The base class for all crops.
Definition: farm.h:534
wr_cuttostraw
Definition: winterrape.h:73
WinterRape::HerbiZero
void HerbiZero(void)
Definition: winterrape.cpp:605
wr_grubbing
Definition: winterrape.h:76
wr_insect_one
Definition: winterrape.h:68
WinterRape::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: winterrape.cpp:49
wr_autumn_plough
Definition: winterrape.h:55
wr_rowcol_one_b
Definition: winterrape.h:67
wr_ferti_p2
Definition: winterrape.h:61
WINTERRAPE_BASE
#define WINTERRAPE_BASE
Definition: winterrape.h:44
WinterRape::WinterRape
WinterRape()
Definition: winterrape.h:91
wr_fungi_one
Definition: winterrape.h:65
WinterRapeToDo
WinterRapeToDo
Definition: winterrape.h:52
wr_rowcol_one
Definition: winterrape.h:66
wr_harvest
Definition: winterrape.h:72
wr_autumn_harrow
Definition: winterrape.h:56
wr_compress
Definition: winterrape.h:74
Farm
The base class for all farm types.
Definition: farm.h:767
wr_herbi_one
Definition: winterrape.h:64
wr_stub_harrow
Definition: winterrape.h:75
wr_autumn_sow
Definition: winterrape.h:57
wr_insect_one_b
Definition: winterrape.h:69
wr_ferti_zero
Definition: winterrape.h:54