ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
DummyCropPestTesting.h
Go to the documentation of this file.
1 //
2 // DummyCropPestTesting.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 DummyCropPestTestingH
29 #define DummyCropPestTestingH
30 
31 #define DCPT_BASE 99999
32 
33 #define DCPT_APRIL_PEST a_field->m_user[1]
34 #define DCPT_MAY_PEST a_field->m_user[2]
35 #define DCPT_JUNE_PEST a_field->m_user[3]
36 #define DCPT_JULY_PEST a_field->m_user[4]
37 #define DCPT_SEPT_PEST a_field->m_user[5]
38 #define DCPT_OCT_PEST a_field->m_user[6]
39 
40 typedef enum {
41  dcpt_start = 1, // Compulsory, start event must always be 1 (one).
58 
59 
60 
61 class DummyCropPestTesting : public Crop
62 {
63 public:
64  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
66  {
67  m_first_date=g_date->DayInYear(1,3);
68  }
69 };
70 
71 #endif
72 // DummyCropPestTesting.H
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
dcpt_September_pest1
Definition: DummyCropPestTesting.h:52
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
dcpt_July_pest1
Definition: DummyCropPestTesting.h:49
Crop::m_first_date
int m_first_date
Definition: farm.h:540
dcpt_October_pest2
Definition: DummyCropPestTesting.h:55
Crop
The base class for all crops.
Definition: farm.h:534
dcpt_April_pest1
Definition: DummyCropPestTesting.h:43
dcpt_October_pest1
Definition: DummyCropPestTesting.h:54
dcpt_June_pest2
Definition: DummyCropPestTesting.h:48
DummyCropPestTesting
Definition: DummyCropPestTesting.h:61
DummyCropPestTestingToDo
DummyCropPestTestingToDo
Definition: DummyCropPestTesting.h:40
dcpt_September_pest2
Definition: DummyCropPestTesting.h:53
dcpt_July_pest2
Definition: DummyCropPestTesting.h:50
DummyCropPestTesting::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: DummyCropPestTesting.cpp:38
dcpt_March_pest1
Definition: DummyCropPestTesting.h:42
DCPT_BASE
#define DCPT_BASE
Definition: DummyCropPestTesting.h:31
dcpt_April_pest2
Definition: DummyCropPestTesting.h:44
dcpt_November_pest1
Definition: DummyCropPestTesting.h:56
Farm
The base class for all farm types.
Definition: farm.h:767
dcpt_start
Definition: DummyCropPestTesting.h:41
dcpt_August_pest1
Definition: DummyCropPestTesting.h:51
dcpt_June_pest1
Definition: DummyCropPestTesting.h:47
DummyCropPestTesting::DummyCropPestTesting
DummyCropPestTesting()
Definition: DummyCropPestTesting.h:65
dcpt_May_pest2
Definition: DummyCropPestTesting.h:46
dcpt_May_pest1
Definition: DummyCropPestTesting.h:45