ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
Carrots.h
Go to the documentation of this file.
1 //
2 // CarrotsEat.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 CARROTS_H
29 #define CARROTS_H
30 
31 #define CARROTS_BASE 7100
32 #define CA_SLURRY_DATE m_field->m_user[0]
33 #define CA_DECIDE_TO_HERB m_field->m_user[1]
34 #define CA_DECIDE_TO_FI m_field->m_user[2]
35 
36 
37 
38 typedef enum {
39  ca_start = 1, // Compulsory, start event must always be 1 (one).
64 } CarrotsToDo;
65 
66 class Carrots: public Crop
67 {
68 public:
69  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
70  Carrots() {
71  m_first_date=g_date->DayInYear(25,4);
72  }
73 };
74 
75 #endif // CARROTS_H
ca_spring_harrow_one
Definition: Carrots.h:43
Carrots::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: Carrots.cpp:36
ca_herbi_two
Definition: Carrots.h:47
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
ca_herbi_one
Definition: Carrots.h:46
ca_fa_npk_two
Definition: Carrots.h:62
Crop::m_first_date
int m_first_date
Definition: farm.h:540
ca_rowcul_one
Definition: Carrots.h:50
CARROTS_BASE
#define CARROTS_BASE
Definition: Carrots.h:31
ca_fa_npk_one
Definition: Carrots.h:61
Crop
The base class for all crops.
Definition: farm.h:534
ca_harvest
Definition: Carrots.h:63
ca_spring_sow
Definition: Carrots.h:45
Carrots::Carrots
Carrots()
Definition: Carrots.h:70
CarrotsToDo
CarrotsToDo
Definition: Carrots.h:38
ca_fp_npk_two
Definition: Carrots.h:60
ca_herbi_three
Definition: Carrots.h:48
Carrots
Definition: Carrots.h:66
ca_spring_harrow_two
Definition: Carrots.h:44
ca_herbi_four
Definition: Carrots.h:49
ca_spring_plough
Definition: Carrots.h:42
ca_insect_three
Definition: Carrots.h:55
ca_fp_slurry
Definition: Carrots.h:41
Farm
The base class for all farm types.
Definition: farm.h:767
ca_water_two
Definition: Carrots.h:57
ca_start
Definition: Carrots.h:39
ca_fp_npk_one
Definition: Carrots.h:59
ca_fa_slurry
Definition: Carrots.h:40
ca_rowcul_three
Definition: Carrots.h:52
ca_rowcul_two
Definition: Carrots.h:51
ca_water_one
Definition: Carrots.h:56
ca_insect_one
Definition: Carrots.h:53
ca_insect_two
Definition: Carrots.h:54
ca_water_three
Definition: Carrots.h:58