Goose Management Model ODdox
1.02
GoosePinkFooted_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_Pinkfoot_Base_BaseH
25
#define Goose_Pinkfoot_Base_BaseH
26
37
//---------------------------------------------------------------------------
38
39
class
Goose_Base
;
40
class
Landscape
;
41
class
Goose_Population_Manager
;
42
46
class
Goose_Pinkfoot_Base
:
public
Goose_Base
47
{
48
public
:
50
Goose_Pinkfoot_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_Pinkfoot_Base
();
57
protected
:
61
virtual
TTypeOfGoose_BaseState
st_ToRoost
();
65
virtual
void
ChangeRoost
() {
m_OurPopulationManager
->
FindClosestRoost
(m_Location_x, m_Location_y, (
unsigned
) gs_Pinkfoot); }
69
virtual
APoint
ChooseHopLoc
();
70
};
71
75
class
Goose_Pinkfoot_FamilyGroup
:
public
Goose_Pinkfoot_Base
76
{
77
public
:
79
Goose_Pinkfoot_FamilyGroup
(
Landscape
* p_L,
Goose_Population_Manager
* p_NPM,
double
a_weight,
bool
a_sex,
int
a_groupsize, APoint a_roost);
81
void
Init
(
Goose_Population_Manager
* p_NPM,
double
a_weight,
bool
a_sex,
int
a_groupsize, APoint a_roost);
83
void
ReInit
(
Landscape
* p_L,
Goose_Population_Manager
* p_NPM,
double
a_weight,
bool
a_sex,
int
a_groupsize, APoint a_roost);
85
virtual
~Goose_Pinkfoot_FamilyGroup
();
87
virtual
void
Step
(
void
);
89
virtual
void
EndStep
(
void
) { ; }
91
virtual
void
KillThis
(
void
);
92
};
93
97
class
Goose_Pinkfoot_NonBreeder
:
public
Goose_Pinkfoot_Base
98
{
99
public
:
101
Goose_Pinkfoot_NonBreeder
(
Landscape
* p_L,
Goose_Population_Manager
* p_NPM,
double
a_weight,
bool
a_sex, APoint roost);
103
void
Init
(
Goose_Population_Manager
* p_NPM,
double
a_weight,
bool
a_sex, APoint a_roost);
105
void
ReInit
(
Landscape
* p_L,
Goose_Population_Manager
* p_NPM,
double
a_weight,
bool
a_sex, APoint a_roost);
107
virtual
~Goose_Pinkfoot_NonBreeder
();
109
virtual
void
Step
(
void
);
110
};
111
#endif
Goose_Pinkfoot_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:
GoosePinkFooted_All.cpp:88
Goose_Pinkfoot_NonBreeder::Goose_Pinkfoot_NonBreeder
Goose_Pinkfoot_NonBreeder(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint roost)
Goose_Pinkfoot_NonBreeder constructor.
Definition:
GoosePinkFooted_All.cpp:247
Goose_Pinkfoot_Base::ChooseHopLoc
virtual APoint ChooseHopLoc()
Pick a hop location point within a_dist meters - must be overridden by descendent classes.
Definition:
GoosePinkFooted_All.cpp:123
Goose_Pinkfoot_Base::Init
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Intitialise object.
Definition:
GoosePinkFooted_All.cpp:74
Goose_Pinkfoot_FamilyGroup::Init
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost)
Intitialise object.
Definition:
GoosePinkFooted_All.cpp:159
Goose_Pinkfoot_Base::st_ToRoost
virtual TTypeOfGoose_BaseState st_ToRoost()
Return to roost and assess whether to forage again that day.
Definition:
GoosePinkFooted_All.cpp:100
Goose_Pinkfoot_FamilyGroup::Step
virtual void Step(void)
The Goose_Pinkfoot_FamilyGroup Step.
Definition:
GoosePinkFooted_All.cpp:184
Goose_Pinkfoot_FamilyGroup::EndStep
virtual void EndStep(void)
The Goose_Pinkfoot_FamilyGroup EndStep.
Definition:
GoosePinkFooted_All.h:89
Goose_Pinkfoot_Base::~Goose_Pinkfoot_Base
virtual ~Goose_Pinkfoot_Base()
Goose_Pinkfoot_Base destructor.
Definition:
GoosePinkFooted_All.cpp:94
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_Pinkfoot_Base::ChangeRoost
virtual void ChangeRoost()
Find the closest roost.
Definition:
GoosePinkFooted_All.h:65
Goose_Population_Manager
The class to handle all goose population related matters.
Definition:
Goose_Population_Manager.h:392
Goose_Pinkfoot_Base::Goose_Pinkfoot_Base
Goose_Pinkfoot_Base(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Goose_Pinkfoot_Base constructor.
Definition:
GoosePinkFooted_All.cpp:69
Goose_Pinkfoot_NonBreeder::Step
virtual void Step(void)
The Goose_Pinkfoot_NonBreeder Step.
Definition:
GoosePinkFooted_All.cpp:275
Goose_Pinkfoot_NonBreeder::~Goose_Pinkfoot_NonBreeder
virtual ~Goose_Pinkfoot_NonBreeder()
Goose_Pinkfoot_NonBreeder destructor.
Definition:
GoosePinkFooted_All.cpp:269
Goose_Base
A class to describe the goose base.
Definition:
Goose_Base.h:131
Goose_Pinkfoot_FamilyGroup
A class to describe the Pinkfoot family group.
Definition:
GoosePinkFooted_All.h:75
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
Goose_Pinkfoot_FamilyGroup::~Goose_Pinkfoot_FamilyGroup
virtual ~Goose_Pinkfoot_FamilyGroup()
Goose_Pinkfoot_FamilyGroup destructor.
Definition:
GoosePinkFooted_All.cpp:178
TTypeOfGoose_BaseState
TTypeOfGoose_BaseState
Definition:
Goose_Base.h:74
Goose_Pinkfoot_FamilyGroup::KillThis
virtual void KillThis(void)
The Goose_Pinkfoot_FamilyGroup KillThis must be overridden for families.
Definition:
GoosePinkFooted_All.cpp:222
Goose_Pinkfoot_Base
A class to describe the Pinkfoot base.
Definition:
GoosePinkFooted_All.h:46
Goose_Pinkfoot_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:
GoosePinkFooted_All.cpp:170
Goose_Pinkfoot_FamilyGroup::Goose_Pinkfoot_FamilyGroup
Goose_Pinkfoot_FamilyGroup(Landscape *p_L, Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, int a_groupsize, APoint a_roost)
Goose_Pinkfoot_FamilyGroup constructor.
Definition:
GoosePinkFooted_All.cpp:153
Goose_Pinkfoot_NonBreeder::Init
void Init(Goose_Population_Manager *p_NPM, double a_weight, bool a_sex, APoint a_roost)
Intitialise object.
Definition:
GoosePinkFooted_All.cpp:253
Goose_Pinkfoot_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:
GoosePinkFooted_All.cpp:263
Goose_Pinkfoot_NonBreeder
A class to describe the Pinkfoot non-breeder.
Definition:
GoosePinkFooted_All.h:97
Repo
ALMaSS_all
GooseManagement
GoosePinkFooted_All.h
Generated on Thu Aug 15 2019 10:25:05 for Goose Management Model ODdox by
1.8.16