ALMaSS Partridge ODdox
1.1
The partridge model description following ODdox protocol
|
Base class for all partridge classes. More...
#include <Partridge_All.h>
Public Member Functions | |
Partridge_Object | GetObjectType () |
Supply object type. More... | |
bool | GetUncleStatus () |
Supply uncle status. More... | |
void | SetUncleStatus (bool a_Status) |
Set uncle status. More... | |
bool | PossibleMate (Partridge_Base *a_partridge) |
Can we mate? More... | |
virtual bool | ArePaired () |
Overridden base function. More... | |
Partridge_Covey * | GetCovey (void) |
Supply covey pointer. More... | |
Partridge_State | GetState (void) |
Supply state. More... | |
void | SetState (Partridge_State a_pars) |
Set state. More... | |
int | GetFamily (void) |
Supply family ID. More... | |
int | GetAge (void) |
Supply age. More... | |
void | SetAge (int a_age) |
Set age. More... | |
long | GetID (void) |
Supply ID. More... | |
void | SetFamily (unsigned int family) |
Set family ID. More... | |
void | SetCovey (Partridge_Covey *a_covey) |
Set covey pointer. More... | |
void | MakeCovey () |
Create our own covey. More... | |
void | SwitchCovey (Partridge_Covey *a_covey) |
Swap coveys. More... | |
Partridge_Base (int a_born_x, int a_born_y, int a_x, int a_y, int a_family_counter, Partridge_Covey *a_covey, Landscape *a_map, Partridge_Population_Manager *a_manager) | |
Constructor for Partridge_Base. More... | |
virtual | ~Partridge_Base (void) |
Destructor. More... | |
virtual void | CopyMyself (int a_Ptype) |
Duplicate this object. More... | |
Public Member Functions inherited from TAnimal | |
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... | |
Public Attributes | |
Partridge_Population_Manager * | m_OurPopulationManager |
Pointer to the population manager. More... | |
Protected Member Functions | |
virtual bool | DailyMortality () |
Background mortality test. More... | |
virtual void | CheckMatePointers () |
Debug. More... | |
Protected Member Functions inherited from TAnimal | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
int | m_signal |
Used to pass information to outputs. More... | |
long | m_id |
Individual bird ID. More... | |
int | m_family_counter |
Family ID. More... | |
int | m_age |
Age in days. More... | |
int | m_born_x |
x-coord of birth More... | |
int | m_born_y |
y-coord of birth More... | |
bool | m_UncleStatus |
If has uncle status in the covey. More... | |
Partridge_Object | m_object_type |
Type of pob object this is. More... | |
Partridge_Covey * | m_covey |
Pointer to the covey. More... | |
Partridge_State | m_state |
Current behavioural state. More... | |
Protected Attributes inherited from TAnimal | |
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... | |
Base class for all partridge classes.
Definition at line 401 of file Partridge_All.h.
Partridge_Base::Partridge_Base | ( | int | a_born_x, |
int | a_born_y, | ||
int | a_x, | ||
int | a_y, | ||
int | a_family_counter, | ||
Partridge_Covey * | a_covey, | ||
Landscape * | a_map, | ||
Partridge_Population_Manager * | a_manager | ||
) |
Constructor for Partridge_Base.
If a_flock is NULL, then assume this is an animal created during population manager initialization and that covey creation/addtion is controlled by the calling method.
Definition at line 156 of file Partridge_All.cpp.
References Partridge_Covey::AddMember(), g_partridge_id, m_age, m_born_x, m_born_y, m_covey, m_family_counter, m_id, m_OurPopulationManager, m_signal, m_state, m_UncleStatus, and pars_Initiation.
|
virtual |
Destructor.
The destructor removes an animal from its flock.
Definition at line 192 of file Partridge_All.cpp.
|
inlinevirtual |
Overridden base function.
Reimplemented in Partridge_Female, and Partridge_Male.
Definition at line 450 of file Partridge_All.h.
|
inlineprotectedvirtual |
Debug.
Reimplemented in Partridge_Female, and Partridge_Male.
Definition at line 426 of file Partridge_All.h.
Referenced by Partridge_Clutch::Step().
|
virtual |
Duplicate this object.
A method required only for experimental manipulations - e.g. sudden doubling of population size.
Definition at line 239 of file Partridge_All.cpp.
References AdultPartridge_struct::age, Partridge_struct::bx, Partridge_struct::by, Partridge_Population_Manager::CreateCloneObjects(), Partridge_struct::family_counter, Partridge_struct::L, m_age, m_born_x, m_born_y, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, m_OurPopulationManager, pob_Male, AdultPartridge_struct::sex, Partridge_struct::x, and Partridge_struct::y.
Referenced by Partridge_Population_Manager::Catastrophe(), and Partridge_Population_Manager::MaleImmigration().
|
protectedvirtual |
Background mortality test.
This should not really be used.
Reimplemented in Partridge_Female, Partridge_Male, Partridge_Chick2, Partridge_Chick, and Partridge_Clutch.
Definition at line 228 of file Partridge_All.cpp.
References cfg_par_base_mortality, and CfgInt::value().
|
inline |
Supply age.
Definition at line 472 of file Partridge_All.h.
References m_age.
Referenced by Partridge_Population_Manager::DoFirst(), and Partridge_Covey::SupplyChickAge().
|
inline |
Supply covey pointer.
Definition at line 453 of file Partridge_All.h.
References m_covey.
Referenced by Partridge_Population_Manager::DissolveCovey().
|
inline |
Supply family ID.
Definition at line 467 of file Partridge_All.h.
References m_family_counter.
Referenced by Partridge_Covey::FindMeAHusband(), Partridge_Covey::FindMeAMateInCovey(), Partridge_Covey::FindMeAWife(), Partridge_Male::OnMating(), and PossibleMate().
|
inline |
Supply ID.
Definition at line 482 of file Partridge_All.h.
References m_id.
Referenced by Partridge_Covey::RemoveMember().
|
inline |
Supply object type.
Definition at line 432 of file Partridge_All.h.
References m_object_type.
Referenced by Partridge_Population_Manager::DissolveCovey(), and Partridge_Communication::PassMessage().
|
inline |
|
inline |
Supply uncle status.
Definition at line 437 of file Partridge_All.h.
References m_UncleStatus.
Referenced by Partridge_Population_Manager::DissolveCovey().
void Partridge_Base::MakeCovey | ( | void | ) |
Create our own covey.
Only called when a bird must make a new covey the bird will be the first member and the only one on calling. NB all housekeeping in the population manager is handled by the Covey constructor. The caller is responsible for removing the bird from the present covey before this call is made (or immediately after).
Definition at line 206 of file Partridge_All.cpp.
References m_covey, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, and m_OurPopulationManager.
Referenced by Partridge_Population_Manager::DissolveCovey(), and Partridge_Male::MFindingMate().
bool Partridge_Base::PossibleMate | ( | Partridge_Base * | a_partridge | ) |
Can we mate?
Checks whether the supplied bird is a potential mate, or is too closely related.
Definition at line 179 of file Partridge_All.cpp.
References GetFamily(), and m_family_counter.
|
inline |
Set age.
Definition at line 477 of file Partridge_All.h.
References m_age.
Referenced by Partridge_Population_Manager::CreateCloneObjects().
|
inline |
Set covey pointer.
Definition at line 492 of file Partridge_All.h.
References m_covey.
Referenced by Partridge_Population_Manager::CreateCloneObjects(), Partridge_Population_Manager::CreateInitialObjects(), and Partridge_Covey::ManagerCheckMerge().
|
inline |
Set family ID.
Definition at line 487 of file Partridge_All.h.
References m_family_counter.
Referenced by Partridge_Male::OnMating().
|
inline |
Set state.
Definition at line 462 of file Partridge_All.h.
References m_state.
Referenced by Partridge_Population_Manager::Catastrophe(), and Partridge_Covey::SetUncle().
|
inline |
Set uncle status.
Definition at line 442 of file Partridge_All.h.
References m_UncleStatus.
Referenced by Partridge_Population_Manager::DissolveCovey(), Partridge_Covey::ManagerCheckMerge(), Partridge_Female::OnWaitForMale(), and Partridge_Covey::SetUncle().
void Partridge_Base::SwitchCovey | ( | Partridge_Covey * | a_covey | ) |
Swap coveys.
Moves the bird from its cuurent covey to the one supplied.
Definition at line 216 of file Partridge_All.cpp.
References Partridge_Covey::AddMember(), m_covey, and Partridge_Covey::RemoveMember().
Referenced by Partridge_Female::OnMating().
|
protected |
Age in days.
Definition at line 410 of file Partridge_All.h.
Referenced by Partridge_Chick::BeginStep(), Partridge_Chick2::BeginStep(), Partridge_Male::BeginStep(), Partridge_Female::BeginStep(), Partridge_Chick::ChDeveloping(), Partridge_Chick2::ChDeveloping(), Partridge_Chick::ChDying(), Partridge_Clutch::ClDeveloping(), CopyMyself(), GetAge(), Partridge_Base(), Partridge_Chick::Partridge_Chick(), and SetAge().
|
protected |
x-coord of birth
Definition at line 412 of file Partridge_All.h.
Referenced by Partridge_Chick2::ChMaturing(), CopyMyself(), and Partridge_Base().
|
protected |
y-coord of birth
Definition at line 414 of file Partridge_All.h.
Referenced by Partridge_Chick2::ChMaturing(), CopyMyself(), and Partridge_Base().
|
protected |
Pointer to the covey.
Definition at line 420 of file Partridge_All.h.
Referenced by Partridge_Male::AmIaMember(), Partridge_Chick::BeginStep(), Partridge_Chick2::BeginStep(), Partridge_Chick::ChDeveloping(), Partridge_Chick::ChDying(), Partridge_Chick::ChMaturing(), Partridge_Chick2::ChMaturing(), Partridge_Clutch::ClDeveloping(), Partridge_Clutch::ClDying(), Partridge_Male::DailyMortality(), Partridge_Female::DailyMortality(), Partridge_Female::FAttractingMate(), Partridge_Female::FCaringForYoung(), Partridge_Female::FDying(), Partridge_Female::FFindingTerritory(), Partridge_Female::FFlocking(), Partridge_Female::FIncubating(), Partridge_Female::FLaying(), Partridge_Female::FMakingNest(), Partridge_Female::FStartingNewBrood(), GetCovey(), MakeCovey(), Partridge_Male::MCaringForYoung(), Partridge_Male::MDying(), Partridge_Male::MFindingMate(), Partridge_Male::MFlocking(), Partridge_Female::OnClutchDeath(), Partridge_Female::OnEggsHatch(), Partridge_Male::OnFemaleGivingUp(), Partridge_Male::OnMateDying(), Partridge_Female::OnMateDying(), Partridge_Female::OnWaitForMale(), Partridge_Base(), Partridge_Chick::Partridge_Chick(), Partridge_Chick2::Partridge_Chick2(), SetCovey(), and SwitchCovey().
|
protected |
Family ID.
Definition at line 408 of file Partridge_All.h.
Referenced by Partridge_Chick::ChMaturing(), Partridge_Chick2::ChMaturing(), Partridge_Clutch::ClDeveloping(), Partridge_Female::FMakingNest(), GetFamily(), Partridge_Male::MFindingMate(), Partridge_Base(), PossibleMate(), and SetFamily().
|
protected |
Individual bird ID.
Definition at line 406 of file Partridge_All.h.
Referenced by GetID(), and Partridge_Base().
|
protected |
Type of pob object this is.
Definition at line 418 of file Partridge_All.h.
Referenced by GetObjectType(), Partridge_Chick::Partridge_Chick(), Partridge_Chick2::Partridge_Chick2(), Partridge_Clutch::Partridge_Clutch(), Partridge_Female::Partridge_Female(), and Partridge_Male::Partridge_Male().
Partridge_Population_Manager* Partridge_Base::m_OurPopulationManager |
Pointer to the population manager.
Definition at line 430 of file Partridge_All.h.
Referenced by Partridge_Clutch::AgDying(), Partridge_Chick::ChDeveloping(), Partridge_Chick::ChDying(), Partridge_Chick::ChMaturing(), Partridge_Chick2::ChMaturing(), Partridge_Clutch::ClDeveloping(), Partridge_Clutch::ClDying(), CopyMyself(), Partridge_Chick2::DailyMortality(), Partridge_Male::DailyMortality(), Partridge_Female::FAttractingMate(), Partridge_Female::FDying(), Partridge_Female::FFindingTerritory(), Partridge_Female::FIncubating(), Partridge_Female::FLaying(), Partridge_Female::FMakingNest(), Partridge_Female::FStartingNewBrood(), Partridge_Female::GetNestingCoverDensity(), MakeCovey(), Partridge_Male::MDying(), Partridge_Male::MFindingMate(), and Partridge_Base().
|
protected |
Used to pass information to outputs.
Definition at line 404 of file Partridge_All.h.
Referenced by Partridge_Chick::BeginStep(), Partridge_Chick2::BeginStep(), Partridge_Male::BeginStep(), Partridge_Female::BeginStep(), Partridge_Chick::ChDeveloping(), and Partridge_Base().
|
protected |
Current behavioural state.
Definition at line 422 of file Partridge_All.h.
Referenced by Partridge_Chick::ChDying(), Partridge_Male::CheckMatePointers(), Partridge_Female::CheckMatePointers(), Partridge_Clutch::ClDying(), Partridge_Female::DailyMortality(), Partridge_Clutch::EndStep(), Partridge_Chick::EndStep(), Partridge_Chick2::EndStep(), Partridge_Male::EndStep(), Partridge_Female::FDying(), Partridge_Female::FIncubating(), Partridge_Female::FLaying(), GetState(), Partridge_Male::MDying(), Partridge_Male::OnChicksDead(), Partridge_Female::OnChicksDead(), Partridge_Male::OnChicksMatured(), Partridge_Female::OnChicksMatured(), Partridge_Female::OnClutchDeath(), Partridge_Female::OnClutchMown(), Partridge_Female::OnEggsHatch(), Partridge_Clutch::OnFarmEvent(), Partridge_Chick::OnFarmEvent(), Partridge_Chick2::OnFarmEvent(), Partridge_Male::OnFarmEvent(), Partridge_Female::OnFarmEvent(), Partridge_Male::OnFemaleGivingUp(), Partridge_Male::OnLookAfterKids(), Partridge_Male::OnMateDying(), Partridge_Female::OnMateDying(), Partridge_Male::OnMating(), Partridge_Female::OnMating(), Partridge_Male::OnMovingHome(), Partridge_Female::OnSetMyClutch(), Partridge_Male::OnStoppingBreeding(), Partridge_Female::OnWaitForMale(), Partridge_Base(), SetState(), Partridge_Male::StartBreedingBehaviour(), Partridge_Clutch::Step(), Partridge_Chick::Step(), Partridge_Chick2::Step(), Partridge_Male::Step(), and Partridge_Female::Step().
|
protected |
If has uncle status in the covey.
Definition at line 416 of file Partridge_All.h.
Referenced by GetUncleStatus(), Partridge_Male::MFindingMate(), Partridge_Female::OnWaitForMale(), Partridge_Base(), and SetUncleStatus().