ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
OSpringBarleyExt.h
Go to the documentation of this file.
1 //
2 // OSpringBarleyExt.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 OSpringBarleyExt_H
29 #define OSpringBarleyExt_H
30 
31 #define OSBarleyExt_BASE 30400
32 #define OSBEXT_ISAUTUMNPLOUGH m_field->m_user[0]
33 #define OSBEXT_SOW_DATE m_field->m_user[1]
34 #define OSBEXT_STRIGLING_DATE m_field->m_user[2]
35 
36 typedef enum {
37  osbext_start = 1, // Compulsory, start event must always be 1 (one).
55 } OSBExtToDo;
56 
57 
58 
59 class OSpringBarleyExt: public Crop
60 {
61 public:
62  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
64  {
65  m_first_date=g_date->DayInYear(1,11);
66  }
67 };
68 
69 #endif // OSpringBarley_H
OSpringBarleyExt
Definition: OSpringBarleyExt.h:59
osbext_strigling2
Definition: OSpringBarleyExt.h:52
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
OSBExtToDo
OSBExtToDo
Definition: OSpringBarleyExt.h:36
osbext_autumn_plough
Definition: OSpringBarleyExt.h:45
OSBarleyExt_BASE
#define OSBarleyExt_BASE
Definition: OSpringBarleyExt.h:31
osbext_spring_sow2
Definition: OSpringBarleyExt.h:49
osbext_strigling1
Definition: OSpringBarleyExt.h:51
Crop::m_first_date
int m_first_date
Definition: farm.h:540
osbext_spring_sow1
Definition: OSpringBarleyExt.h:48
Crop
The base class for all crops.
Definition: farm.h:534
osbext_ferti_s2
Definition: OSpringBarleyExt.h:41
osbext_harvest
Definition: OSpringBarleyExt.h:42
osbext_start
Definition: OSpringBarleyExt.h:37
osbext_straw_chopping
Definition: OSpringBarleyExt.h:54
osbext_strigling3
Definition: OSpringBarleyExt.h:53
osbext_spring_plough_s
Definition: OSpringBarleyExt.h:44
OSpringBarleyExt::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: OSpringBarleyExt.cpp:33
osbext_spring_plough_p
Definition: OSpringBarleyExt.h:43
osbext_spring_harrow
Definition: OSpringBarleyExt.h:46
osbext_hay
Definition: OSpringBarleyExt.h:50
Farm
The base class for all farm types.
Definition: farm.h:767
osbext_ferti_p1
Definition: OSpringBarleyExt.h:38
osbext_ferti_p2
Definition: OSpringBarleyExt.h:39
osbext_ferti_s1
Definition: OSpringBarleyExt.h:40
osbext_spring_roll
Definition: OSpringBarleyExt.h:47
OSpringBarleyExt::OSpringBarleyExt
OSpringBarleyExt()
Definition: OSpringBarleyExt.h:63