Goose Management Model ODdox  1.02
GooseGreylag_All.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************************************
3 Copyright (c) 2013, Christopher John Topping, University of Aarhus
4 All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without modification, are permitted provided
7 that the following conditions are met:
8 
9 Redistributions of source code must retain the above copyright notice, this list of conditions and the
10 following disclaimer.
11 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
12 the following disclaimer in the documentation and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
15 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
17 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
19 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 ********************************************************************************************************
23 */
24 #ifndef Goose_Greylag_Base_BaseH
25 #define Goose_Greylag_Base_BaseH
26 
37 //---------------------------------------------------------------------------
38 
39 class Goose_Base;
40 class Landscape;
42 
47 {
48 public:
50  Goose_Greylag_Base(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
52  void Init(Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
54  void ReInit(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
56  virtual ~Goose_Greylag_Base();
57 protected:
65  virtual void ChangeRoost() { m_OurPopulationManager->FindClosestRoost(m_Location_x, m_Location_y, (unsigned) gs_Greylag); }
69  virtual APoint ChooseHopLoc();
70 
71 };
72 
77 {
78 public:
80  Goose_Greylag_FamilyGroup(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost);
82  void Init(Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost);
84  void ReInit(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost);
88  virtual void Step( void );
90  virtual void EndStep(void) { ; }
92  virtual void KillThis(void);
93 };
94 
99 {
100 public:
102  Goose_Greylag_NonBreeder(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
104  void Init(Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
106  void ReInit(Landscape* p_L, Goose_Population_Manager* p_NPM, double a_weight, bool a_sex, APoint a_roost);
108  virtual ~Goose_Greylag_NonBreeder();
110  virtual void Step( void );
111 };
112 #endif
Goose_Greylag_NonBreeder::Goose_Greylag_NonBreeder
Goose_Greylag_NonBreeder(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Goose_Greylag_NonBreeder constructor.
Definition: GooseGreylag_All.cpp:231
Goose_Greylag_NonBreeder::Step
virtual void Step(void)
The Goose_Greylag_NonBreeder Step.
Definition: GooseGreylag_All.cpp:259
Goose_Greylag_Base::Goose_Greylag_Base
Goose_Greylag_Base(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Goose_Greylag_Base constructor.
Definition: GooseGreylag_All.cpp:68
Goose_Greylag_Base::ChooseHopLoc
virtual APoint ChooseHopLoc()
Pick a hop location point within a_dist meters - must be overridden by descendent classes.
Definition: GooseGreylag_All.cpp:121
Goose_Greylag_FamilyGroup::ReInit
void ReInit(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost)
ReInit for object pool.
Definition: GooseGreylag_All.cpp:154
Goose_Greylag_NonBreeder
A class to describe the Greylag non-breeder.
Definition: GooseGreylag_All.h:98
Goose_Greylag_Base::~Goose_Greylag_Base
virtual ~Goose_Greylag_Base()
Goose_Greylag_Base destructor.
Definition: GooseGreylag_All.cpp:92
Goose_Greylag_FamilyGroup::KillThis
virtual void KillThis(void)
The FamilyGroup KillThis must be overridden for families.
Definition: GooseGreylag_All.cpp:205
Landscape
The landscape class containing all environmental and topographical data.
Definition: landscape.h:112
Goose_Population_Manager::FindClosestRoost
void FindClosestRoost(int &a_x, int &a_y, unsigned a_type)
Changes a_x & a_y to the location of the nearest roost of a_type to a_x, a_y.
Definition: Goose_Population_Manager.cpp:1000
Goose_Greylag_NonBreeder::ReInit
void ReInit(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
ReInit for object pool.
Definition: GooseGreylag_All.cpp:247
Goose_Greylag_Base::ChangeRoost
virtual void ChangeRoost()
Find the closest roost.
Definition: GooseGreylag_All.h:65
Goose_Greylag_Base::Init
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Intitialise object.
Definition: GooseGreylag_All.cpp:77
Goose_Greylag_Base::ReInit
void ReInit(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
ReInit for object pool.
Definition: GooseGreylag_All.cpp:72
Goose_Greylag_Base
A class to describe the Greylag base.
Definition: GooseGreylag_All.h:46
Goose_Population_Manager
The class to handle all goose population related matters.
Definition: Goose_Population_Manager.h:392
Goose_Greylag_FamilyGroup::Goose_Greylag_FamilyGroup
Goose_Greylag_FamilyGroup(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost)
Goose_Greylag_FamilyGroup constructor.
Definition: GooseGreylag_All.cpp:149
Goose_Greylag_FamilyGroup::~Goose_Greylag_FamilyGroup
virtual ~Goose_Greylag_FamilyGroup()
Goose_Greylag_FamilyGroup destructor.
Definition: GooseGreylag_All.cpp:161
Goose_Greylag_Base::st_ToRoost
TTypeOfGoose_BaseState st_ToRoost()
Return to roost and assess whether to forage again that day.
Definition: GooseGreylag_All.cpp:98
Goose_Greylag_FamilyGroup
A class to describe the Greylag family group.
Definition: GooseGreylag_All.h:76
Goose_Greylag_FamilyGroup::Init
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost)
Intitialise object.
Definition: GooseGreylag_All.cpp:140
Goose_Greylag_FamilyGroup::EndStep
virtual void EndStep(void)
The Goose_Greylag_FamilyGroup EndStep.
Definition: GooseGreylag_All.h:90
Goose_Base
A class to describe the goose base.
Definition: Goose_Base.h:131
Goose_Greylag_NonBreeder::Init
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Intitialise object.
Definition: GooseGreylag_All.cpp:237
Goose_Base::m_OurPopulationManager
Goose_Population_Manager * m_OurPopulationManager
This is a time saving pointer to the correct population manager object.
Definition: Goose_Base.h:151
TTypeOfGoose_BaseState
TTypeOfGoose_BaseState
Definition: Goose_Base.h:74
Goose_Greylag_NonBreeder::~Goose_Greylag_NonBreeder
virtual ~Goose_Greylag_NonBreeder()
Goose_Greylag_NonBreeder destructor.
Definition: GooseGreylag_All.cpp:253
Goose_Greylag_FamilyGroup::Step
virtual void Step(void)
The Goose_Greylag_FamilyGroup Step.
Definition: GooseGreylag_All.cpp:167