ALMaSS Vole ODDox  1.1
The vole model description following ODdox protocol
PermanentGrassGrazed.h
Go to the documentation of this file.
1 //
2 // PermanentGrassGrazed.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 PermanentGrassGrazed_H
29 #define PermanentGrassGrazed_H
30 
31 #define PGG_BASE 5700
32 #define PGG_CUT_DATE m_field->m_user[0]
33 #define PGG_FERTI_DATE m_field->m_user[1]
34 
35 typedef enum {
36  pgg_start = 1, // Compulsory, start event must always be 1 (one).
50 
51 
52 
54 {
55 public:
56  bool Do( Farm *a_farm, LE *a_field, FarmEvent *a_ev );
58  {
59  m_first_date=g_date->DayInYear(15,4);
60  }
61 
62 };
63 
64 #endif // PermanentGrassGrazed_H
pgg_cut_weeds
Definition: PermanentGrassGrazed.h:41
FarmEvent
A struct to hold the information required to trigger a farm event.
Definition: farm.h:463
pgg_cut_to_hay
Definition: PermanentGrassGrazed.h:37
PermanentGrassGrazed::PermanentGrassGrazed
PermanentGrassGrazed()
Definition: PermanentGrassGrazed.h:57
pgg_cattle_out1
Definition: PermanentGrassGrazed.h:38
Crop::m_first_date
int m_first_date
Definition: farm.h:540
Crop
The base class for all crops.
Definition: farm.h:534
pgg_ferti_s
Definition: PermanentGrassGrazed.h:43
PermanentGrassGrazed
Definition: PermanentGrassGrazed.h:53
PGG_BASE
#define PGG_BASE
Definition: PermanentGrassGrazed.h:31
pgg_compress_straw
Definition: PermanentGrassGrazed.h:47
pgg_raking1
Definition: PermanentGrassGrazed.h:45
pgg_wait
Definition: PermanentGrassGrazed.h:48
pgg_cattle_is_out
Definition: PermanentGrassGrazed.h:40
pgg_raking2
Definition: PermanentGrassGrazed.h:46
PermanentGrassGrazedToDo
PermanentGrassGrazedToDo
Definition: PermanentGrassGrazed.h:35
Farm
The base class for all farm types.
Definition: farm.h:767
PermanentGrassGrazed::Do
bool Do(Farm *a_farm, LE *a_field, FarmEvent *a_ev)
Definition: PermanentGrassGrazed.cpp:37
pgg_herbicide
Definition: PermanentGrassGrazed.h:42
pgg_cattle_out2
Definition: PermanentGrassGrazed.h:39
pgg_start
Definition: PermanentGrassGrazed.h:36
pgg_ferti_p
Definition: PermanentGrassGrazed.h:44