ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
OWinterRape.h
Go to the documentation of this file.
1 //
2 // OWinterRape.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 OWINTERRAPE_H
29 #define OWINTERRAPE_H
30 
31 // <cropname>_BASE is the first event number to be dumped into the
32 // debugging log from this crop. *Must* be unique among all crops.
33 // I suggest steps of 100 between crops.
34 
35 #define OWINTERRAPE_BASE 6600
36 #define OWR_DID_RC_CLEAN m_field->m_user[0]
37 #define OWR_DID_HERBI_ZERO m_field->m_user[1]
38 #define OWR_INSECT_DATE m_field->m_user[2]
39 #define OWR_FUNGI_DATE m_field->m_user[3]
40 #define OWR_SWARTH_DATE m_field->m_user[4]
41 
42 typedef enum {
43  owr_start = 1, // Compulsory, start event must always be 1 (one).
59 
60 
61 
62 class OWinterRape: public Crop
63 {
64  // Private methods corresponding to the different management steps
65  // (when needed).
66 
67 public:
68  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
70  {
71  m_first_date=g_date->DayInYear(21,8);
72  }
73 };
74 
75 #endif // OWINTERRAPE_H
owr_row_cultivation_two
Definition: OWinterRape.h:50
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
OWinterRape::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OWinterRape.cpp:32
owr_fp_slurry
Definition: OWinterRape.h:52
owr_row_cultivation_three
Definition: OWinterRape.h:53
Crop::m_first_date
int m_first_date
Definition: farm.h:540
Crop
The base class for all crops.
Definition: farm.h:534
OWinterRape::OWinterRape
OWinterRape()
Definition: OWinterRape.h:69
OWinterRapeToDo
OWinterRapeToDo
Definition: OWinterRape.h:42
owr_autumn_plough
Definition: OWinterRape.h:46
owr_row_cultivation_one
Definition: OWinterRape.h:49
OWinterRape
Definition: OWinterRape.h:62
OWINTERRAPE_BASE
#define OWINTERRAPE_BASE
Definition: OWinterRape.h:35
owr_autumn_harrow
Definition: OWinterRape.h:47
owr_fa_slurry
Definition: OWinterRape.h:51
Farm
The base class for all farm types.
Definition: farm.h:767
owr_stub_harrow
Definition: OWinterRape.h:57
owr_start
Definition: OWinterRape.h:43
owr_fa_manure
Definition: OWinterRape.h:44
owr_straw_chop
Definition: OWinterRape.h:56
owr_fp_manure
Definition: OWinterRape.h:45
owr_harvest
Definition: OWinterRape.h:55
owr_swarth
Definition: OWinterRape.h:54
owr_autumn_sow
Definition: OWinterRape.h:48