ALMaSS Hare ODDox  1.1
The hare model description following ODdox protocol
seedgrass2.h
Go to the documentation of this file.
1 //
2 // seedgrass2.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 SEEDGRASS2_H
29 #define SEEDGRASS2_H
30 
31 #define SEEDGRASS2_BASE 500
32 #define SG2_WATER_DATE m_field->m_user[0]
33 #define SG2_FUNGI_DATE m_field->m_user[1]
34 #define SG2_DECIDE_TO_HERB m_field->m_user[2]
35 
36 typedef enum {
37  sg2_start = 1, // Compulsory, start event must always be 1 (one).
52 
53 
54 
55 class SeedGrass2: public Crop
56 {
57 public:
58  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
60  {
61  m_first_date=g_date->DayInYear(14,3);
62  }
63 
64 };
65 
66 #endif // SEEDGRASS1_H
sg2_water_zero_b
Definition: seedgrass2.h:43
sg2_water_zero
Definition: seedgrass2.h:42
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
SeedGrass2ToDo
SeedGrass2ToDo
Definition: seedgrass2.h:36
sg2_ferti_zero
Definition: seedgrass2.h:38
sg2_fungi_zero
Definition: seedgrass2.h:41
sg2_herbi_one
Definition: seedgrass2.h:40
sg2_compress
Definition: seedgrass2.h:48
sg2_harvest
Definition: seedgrass2.h:45
Crop::m_first_date
int m_first_date
Definition: farm.h:540
sg2_herbi_zero
Definition: seedgrass2.h:39
sg2_stubbleharrow
Definition: seedgrass2.h:50
Crop
The base class for all crops.
Definition: farm.h:534
sg2_start
Definition: seedgrass2.h:37
SEEDGRASS2_BASE
#define SEEDGRASS2_BASE
Definition: seedgrass2.h:31
sg2_growthregulation
Definition: seedgrass2.h:49
SeedGrass2
Definition: seedgrass2.h:55
SeedGrass2::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: seedgrass2.cpp:37
sg2_swarth
Definition: seedgrass2.h:44
Farm
The base class for all farm types.
Definition: farm.h:767
SeedGrass2::SeedGrass2
SeedGrass2()
Definition: seedgrass2.h:59
sg2_burnstrawstubble
Definition: seedgrass2.h:47
sg2_strawchopping
Definition: seedgrass2.h:46