ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
OFodderbeet.h
Go to the documentation of this file.
1 //
2 // OFodderbeet.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 OFodderbeet_h
29 #define OFodderbeet_h
30 
31 #define OFBeet_BASE 6150
32 
33 #define OFB_DID_HARROW m_field->m_user[0]
34 #define OFB_DID_NPKS_ONE m_field->m_user[1]
35 #define OFB_DID_SLURRY m_field->m_user[2]
36 #define OFB_SOW_DATE m_field->m_user[3]
37 
38 #define OFB_DID_ROW_TWO m_field->m_user[0]
39 #define OFB_DID_NPKS_TWO m_field->m_user[2]
40 #define OFB_DID_WATER_ONE m_field->m_user[3]
41 #define OFB_TRULY_DID_WATER_ONE m_field->m_user[4]
42 
43 typedef enum {
44  ofb_start = 1, // Compulsory, start event must always be 1 (one).
60 } OFBToDo;
61 
62 
63 
64 class OFodderbeet: public Crop
65 {
66 public:
67  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
69  {
70  m_first_date=g_date->DayInYear(11,10); // Was 1,10 - changed just for sake of getting year on year beet
71  }
72 };
73 
74 #endif // OFodderbeet_h
ofb_row_cultivation_one
Definition: OFodderbeet.h:54
OFBeet_BASE
#define OFBeet_BASE
Definition: OFodderbeet.h:31
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
ofb_fertnpks_two
Definition: OFodderbeet.h:56
ofb_spring_roll
Definition: OFodderbeet.h:53
ofb_autumn_plough
Definition: OFodderbeet.h:45
ofb_spring_plough
Definition: OFodderbeet.h:47
OFodderbeet
Definition: OFodderbeet.h:64
Crop::m_first_date
int m_first_date
Definition: farm.h:540
ofb_start_threads_one
Definition: OFodderbeet.h:48
Crop
The base class for all crops.
Definition: farm.h:534
ofb_spring_sow
Definition: OFodderbeet.h:52
OFodderbeet::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OFodderbeet.cpp:31
ofb_spring_harrow
Definition: OFodderbeet.h:49
ofb_start
Definition: OFodderbeet.h:44
ofb_water_one
Definition: OFodderbeet.h:57
ofb_harvest
Definition: OFodderbeet.h:59
ofb_fertmanure
Definition: OFodderbeet.h:46
ofb_row_cultivation_two
Definition: OFodderbeet.h:55
OFodderbeet::OFodderbeet
OFodderbeet()
Definition: OFodderbeet.h:68
Farm
The base class for all farm types.
Definition: farm.h:767
ofb_fertnpks_one
Definition: OFodderbeet.h:50
ofb_fertslurry
Definition: OFodderbeet.h:51
OFBToDo
OFBToDo
Definition: OFodderbeet.h:43
ofb_water_two
Definition: OFodderbeet.h:58