ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
The base class for all ALMaSS animal classes. More...
#include <populationmanager.h>
Public Member Functions | |
unsigned | SupplyFarmOwnerRef () |
AnimalPosition | SupplyPosition () |
APoint | SupplyPoint () |
int | SupplyPolygonRef () |
int | Supply_m_Location_x () |
int | Supply_m_Location_y () |
virtual void | KillThis () |
virtual void | CopyMyself () |
void | SetX (int a_x) |
void | SetY (int a_y) |
TAnimal (int x, int y, Landscape *L) | |
virtual void | BeginStep (void) |
BeingStep behaviour - must be implemented in descendent classes. More... | |
virtual void | Step (void) |
Step behaviour - must be implemented in descendent classes. More... | |
virtual void | EndStep (void) |
EndStep behaviour - must be implemented in descendent classes. More... | |
virtual void | ReinitialiseObject (int x, int y, Landscape *L) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual int | WhatState () |
virtual void | Dying () |
void | CheckManagement (void) |
void | CheckManagementXY (int x, int y) |
virtual bool | OnFarmEvent (FarmToDo) |
Public Member Functions inherited from TALMaSSObject | |
int | GetCurrentStateNo () |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
virtual void | ReinitialiseObject () |
Used to re-use an object - must be implemented in descendent classes. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject () |
The destructor for TALMaSSObject. More... | |
void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
Protected Member Functions | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
int | m_Location_x |
int | m_Location_y |
Landscape * | m_OurLandscape |
Protected Attributes inherited from TALMaSSObject | |
int | m_CurrentStateNo |
The basic state number for all objects - '-1' indicates death. More... | |
bool | m_StepDone |
Indicates whether the iterative step code is done for this timestep. More... | |
The base class for all ALMaSS animal classes.
Includes all the functionality required to be handled by classes derived from Population_Manager, hence a number of empty methods that MUST be reimplemented in descendent classes e.g. CopyMyself()
Definition at line 205 of file populationmanager.h.
TAnimal::TAnimal | ( | int | x, |
int | y, | ||
Landscape * | L | ||
) |
TAnimal Constructor
Definition at line 1367 of file PopulationManager.cpp.
|
inlinevirtual |
BeingStep behaviour - must be implemented in descendent classes.
Reimplemented from TALMaSSObject.
Reimplemented in Partridge_Female, Partridge_Male, Partridge_Covey, Partridge_Chick2, Partridge_Chick, and Partridge_Clutch.
Definition at line 250 of file populationmanager.h.
void TAnimal::CheckManagement | ( | void | ) |
Checks to see if there has been a management event at the TAnimals' x,y location. If so calls an event handler to handle the management event.
Definition at line 1404 of file PopulationManager.cpp.
References sleep_all_day.
Referenced by Partridge_Clutch::BeginStep(), Partridge_Chick::BeginStep(), Partridge_Chick2::BeginStep(), Partridge_Male::BeginStep(), and Partridge_Female::BeginStep().
void TAnimal::CheckManagementXY | ( | int | x, |
int | y | ||
) |
Checks to see if there has been a management event at the x,y location. If so calls an event handler to handle the management event.
Definition at line 1417 of file PopulationManager.cpp.
References sleep_all_day.
|
inlinevirtual |
Definition at line 224 of file populationmanager.h.
|
inlineprotected |
Corrects wrap around co-ordinate problems.
Does the standard wrap around testing of positions. Uses the addition and modulus operators to avoid testing for negative or > landscape extent. This would be an alternative that should be tested for speed at some point.
Definition at line 231 of file populationmanager.h.
References m_Location_x, m_Location_y, m_OurLandscape, Landscape::SupplySimAreaHeight(), and Landscape::SupplySimAreaWidth().
|
inlinevirtual |
Reimplemented in Partridge_Female, Partridge_Male, Partridge_Chick, and Partridge_Clutch.
Definition at line 266 of file populationmanager.h.
References KillThis().
Referenced by Partridge_Covey::CoveyEmigrate(), and Partridge_Covey::CoveyIndividualEmigrate().
|
inlinevirtual |
EndStep behaviour - must be implemented in descendent classes.
Reimplemented from TALMaSSObject.
Reimplemented in Partridge_Female, Partridge_Male, Partridge_Covey, Partridge_Chick2, Partridge_Chick, and Partridge_Clutch.
Definition at line 254 of file populationmanager.h.
|
inlinevirtual |
Reimplemented in Partridge_Female, and Partridge_Male.
Definition at line 219 of file populationmanager.h.
References TALMaSSObject::m_CurrentStateNo, and TALMaSSObject::m_StepDone.
Referenced by Dying().
|
inlinevirtual |
Reimplemented in Partridge_Female, Partridge_Male, Partridge_Chick2, Partridge_Chick, and Partridge_Clutch.
Definition at line 271 of file populationmanager.h.
|
inlinevirtual |
Used to re-use an object - must be implemented in descendent classes.
Definition at line 257 of file populationmanager.h.
References m_Location_x, m_Location_y, m_OurLandscape, and TALMaSSObject::ReinitialiseObject().
|
inline |
Definition at line 240 of file populationmanager.h.
References m_Location_x.
Referenced by Partridge_Covey::CoveyUpdateMemberPositions().
|
inline |
Definition at line 243 of file populationmanager.h.
References m_Location_y.
Referenced by Partridge_Covey::CoveyUpdateMemberPositions().
|
inlinevirtual |
Step behaviour - must be implemented in descendent classes.
Reimplemented from TALMaSSObject.
Reimplemented in Partridge_Female, Partridge_Male, Partridge_Covey, Partridge_Chick2, Partridge_Chick, and Partridge_Clutch.
Definition at line 252 of file populationmanager.h.
|
inline |
Definition at line 213 of file populationmanager.h.
References m_Location_x.
Referenced by Partridge_Population_Manager::CreateCloneObjects(), Partridge_Population_Manager::CreateInitialObjects(), Population_Manager::FindClosest(), Partridge_Covey::FindMateInArea(), CompareX::operator()(), and Partridge_Population_Manager::TheRipleysOutputProbe().
|
inline |
Definition at line 216 of file populationmanager.h.
References m_Location_y.
Referenced by Partridge_Population_Manager::CreateCloneObjects(), Partridge_Population_Manager::CreateInitialObjects(), Partridge_Covey::FindMateInArea(), CompareY::operator()(), and Partridge_Population_Manager::TheRipleysOutputProbe().
unsigned TAnimal::SupplyFarmOwnerRef | ( | ) |
Provides the farmer reference for the location of a TAnimal
Definition at line 1359 of file PopulationManager.cpp.
|
inline |
|
inline |
Definition at line 210 of file populationmanager.h.
References m_Location_x, m_Location_y, m_OurLandscape, and Landscape::SupplyPolyRef().
AnimalPosition TAnimal::SupplyPosition | ( | ) |
Provides the location of an animal in terms of x,y,elementtype and vegetation type
Definition at line 1345 of file PopulationManager.cpp.
References AnimalPosition::m_EleType, AnimalPosition::m_VegType, AnimalPosition::m_x, and AnimalPosition::m_y.
|
inlinevirtual |
Definition at line 263 of file populationmanager.h.
Referenced by Partridge_Male::DailyMortality(), Partridge_Population_Manager::DoMaleSanityCheck(), CompareState::operator()(), and Partridge_Communication::PassMessage().
|
protected |
Definition at line 225 of file populationmanager.h.
Referenced by Partridge_Chick::ChMaturing(), Partridge_Chick2::ChMaturing(), Partridge_Clutch::ClDeveloping(), Partridge_Base::CopyMyself(), CorrectWrapRound(), Partridge_Covey::CoveyUpdateMemberPositions(), Partridge_Female::FMakingNest(), Partridge_Female::GetNestingCoverDensity(), Partridge_Base::MakeCovey(), Partridge_Male::MFindingMate(), ReinitialiseObject(), SetX(), Supply_m_Location_x(), SupplyPoint(), and SupplyPolygonRef().
|
protected |
Definition at line 228 of file populationmanager.h.
Referenced by Partridge_Chick::ChMaturing(), Partridge_Chick2::ChMaturing(), Partridge_Clutch::ClDeveloping(), Partridge_Base::CopyMyself(), CorrectWrapRound(), Partridge_Covey::CoveyUpdateMemberPositions(), Partridge_Female::FMakingNest(), Partridge_Female::GetNestingCoverDensity(), Partridge_Base::MakeCovey(), Partridge_Male::MFindingMate(), ReinitialiseObject(), SetY(), Supply_m_Location_y(), SupplyPoint(), and SupplyPolygonRef().
|
protected |
Definition at line 229 of file populationmanager.h.
Referenced by Partridge_Covey::BeginStep(), Partridge_Chick::ChDeveloping(), Partridge_Male::CheckMatePointers(), Partridge_Female::CheckMatePointers(), Partridge_Base::CopyMyself(), CorrectWrapRound(), Partridge_Chick2::DailyMortality(), Partridge_Male::DailyMortality(), Partridge_Female::DailyMortality(), Partridge_Clutch::EndStep(), Partridge_Chick::EndStep(), Partridge_Chick2::EndStep(), Partridge_Male::EndStep(), Partridge_Female::FBuildingUpResources(), Partridge_Female::FFindingTerritory(), Partridge_Female::FLaying(), Partridge_Female::FMakingNest(), Partridge_Female::FStartingNewBrood(), Partridge_Covey::HabitatEvalPoly(), Partridge_Base::MakeCovey(), Partridge_Male::MFindingMate(), Partridge_Covey::NestGoodSpot(), Partridge_Clutch::OnFarmEvent(), Partridge_Chick::OnFarmEvent(), Partridge_Chick2::OnFarmEvent(), Partridge_Male::OnFarmEvent(), Partridge_Female::OnFarmEvent(), Partridge_Female::OnMateDying(), Partridge_Male::OnMating(), ReinitialiseObject(), Partridge_Clutch::Step(), Partridge_Chick::Step(), Partridge_Chick2::Step(), Partridge_Male::Step(), Partridge_Female::Step(), and SupplyPolygonRef().