ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
NorwegianOats.h
Go to the documentation of this file.
1 //
2 // NorwegianOats.h
3 //
4 /*
5 *******************************************************************************************************
6 Copyright (c) 2016, 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 NorwegianOats_H
29 #define NorwegianOats_H
30 
31 #define NO_OATS_BASE 10020
32 #define NO_OATS_DID_AUTUMN_PLOUGH m_field->m_user[0]
33 
34 typedef enum {
35  no_oats_start = 1, // Compulsory, start event must always be 1 (one).
43 } NO_OatsToDo;
44 
45 
46 
47 class NorwegianOats : public Crop
48 {
49 public:
50  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
52  {
53  m_first_date=g_date->DayInYear(7,9);
54  m_ddegstoharvest = 1400; // this is hard coded for each crop that uses this
55  }
56 };
57 
58 #endif // NorwegianOats_H
NorwegianOats::NorwegianOats
NorwegianOats()
Definition: NorwegianOats.h:51
no_oats_haybailing
Definition: NorwegianOats.h:42
Crop::m_ddegstoharvest
int m_ddegstoharvest
Definition: farm.h:543
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
NO_OATS_BASE
#define NO_OATS_BASE
Definition: NorwegianOats.h:31
Crop::m_first_date
int m_first_date
Definition: farm.h:540
Crop
The base class for all crops.
Definition: farm.h:534
no_oats_spring_sow
Definition: NorwegianOats.h:39
no_oats_autumn_plough
Definition: NorwegianOats.h:36
NO_OatsToDo
NO_OatsToDo
Definition: NorwegianOats.h:34
no_oats_start
Definition: NorwegianOats.h:35
no_oats_spring_plough
Definition: NorwegianOats.h:37
NorwegianOats
Definition: NorwegianOats.h:47
Farm
The base class for all farm types.
Definition: farm.h:767
no_oats_spring_roll
Definition: NorwegianOats.h:40
no_oats_harvest
Definition: NorwegianOats.h:41
NorwegianOats::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: NorwegianOats.cpp:33
no_oats_spring_harrow
Definition: NorwegianOats.h:38