ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <skylarks_all.h>
Public Member Functions | |
Skylark_Base (int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) | |
virtual void | ReInit (int x, int y, SkTerritories *Terrs, Landscape *L, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
virtual double | On_FoodSupply (double) |
void | AddStriglingMort (const int lifestage) const |
int | WhatState () override |
Returns the objects current state number. More... | |
bool | InSquare (rectangle R) const |
Public Member Functions inherited from TAnimal | |
TAnimal (int x, int y, Landscape *L) | |
The TAnimal constructor saving the x,y, location and the landscape pointer. More... | |
TAnimal (int x, int y) | |
The TAnimal constructor saving the x,y used if landscape is already set. More... | |
void | SetGuardMapIndex (int a_index_x, int a_index_y) |
Set the guard map index, this is used to avoid two animals operating in the same location when using multithread. More... | |
unsigned | SupplyFarmOwnerRef () const |
Get the current location farm ref if any. More... | |
AnimalPosition | SupplyPosition () const |
Returns the objects location and habitat type and veg type. More... | |
APoint | SupplyPoint () const |
Returns the objects location in ALMaSS coordinates. More... | |
int | SupplyPolygonRef () const |
Returns the polygon reference where the object is located. More... | |
TTypesOfLandscapeElement | SupplyPolygonType () const |
Returns the polygon type where the object is located. More... | |
int | Supply_m_Location_x () const |
Returns the ALMaSS x-coordinate. More... | |
int | Supply_m_Location_y () const |
Returns the ALMaSS y-coordinate. More... | |
int | SupplyGuardCellX () const |
Returns the x-index to the guard cell. More... | |
int | SupplyGuardCellY () const |
Returns the y-index to the guard cell. More... | |
int | SupplyAge () const |
Returns the animals age in days. More... | |
void | SetAge (int a_age) |
Sets the animals age in days. More... | |
virtual void | KillThis () |
Sets all parameters ready for object destruction. More... | |
virtual void | CopyMyself () |
Used to copy the object details to another in descendent classes. More... | |
void | SetX (const int a_x) |
Sets the x-coordinate. More... | |
void | SetY (const int a_y) |
Sets the y-coordinate. More... | |
virtual void | ReinitialiseObject (int a_x, int a_y, Landscape *a_l_ptr) |
virtual void | ReinitialiseObject (int a_x, int a_y) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual void | Dying () |
A wrapped for KillThis - ideally should not be used. More... | |
void | CheckManagement () |
Used to start a check for any management related effects at the objects current location. More... | |
void | CheckManagementXY (int a_x, int a_y) |
Used to start a check for any management related effects at x,y. More... | |
virtual bool | OnFarmEvent (FarmToDo) |
Must be reimplemented if used in descendent classes. Sets the action on a management event. More... | |
Public Member Functions inherited from TALMaSSObject | |
int | GetCurrentStateNo () const |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () const |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
virtual void | BeginStep () |
BeingStep behaviour - must be implemented in descendent classes. More... | |
virtual void | Step () |
Step behaviour - must be implemented in descendent classes. More... | |
virtual void | EndStep () |
EndStep behaviour - must be implemented in descendent classes. More... | |
void | ReinitialiseObjectBase () |
Used to initialise an object. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject ()=default |
The destructor for TALMaSSObject. More... | |
Public Attributes | |
TTypesOfSkState | m_CurrentSkState |
int | Age |
double | m_Size |
int | m_Born_x |
int | m_Born_y |
int | m_MyHome |
The vegetation type where the skylark was born. More... | |
SkTerritories * | m_OurTerritories |
Skylark_Population_Manager * | m_OurPopulationManager |
Static Protected Member Functions | |
static bool | DailyMortality (int mort) |
Additional Inherited Members | |
Static Public Member Functions inherited from TAnimal | |
static void | SetSimulationWidth (int a_value) |
Sets the simulation width. More... | |
static void | SetSimulationHeight (int a_value) |
Sets the simulation height. More... | |
static void | SetDayInYear (int a_value) |
Sets the day in year attribute. More... | |
static void | SetOurLandscape (Landscape *a_value) |
Sets the landscape pointer. More... | |
static void | SetTempToday (double a_value) |
Sets the temperature today attribute. More... | |
Static Public Member Functions inherited from TALMaSSObject | |
static void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
Protected Member Functions inherited from TAnimal | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes inherited from TAnimal | |
int | m_Location_x |
The objects ALMaSS x coordinate. More... | |
int | m_Location_y |
The objects ALMaSS y coordinate. More... | |
int | m_guard_cell_x |
The index x to the guard cell. More... | |
int | m_guard_cell_y |
The index y to the guard cell. More... | |
int | m_AgeDays {0} |
To hold the age in days. More... | |
PesticideToxicity | m_my_pesticide |
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... | |
Static Protected Attributes inherited from TAnimal | |
static Landscape * | m_OurLandscape = nullptr |
A pointer to the landscape object shared with all TAnimal objects. More... | |
static int | m_SimulationWidth = 0 |
A static member for the simulation width because it is often used by descendent classes. More... | |
static int | m_SimulationHeight = 0 |
A static member for the simulation height because it is often used by descendent classes. More... | |
static double | m_TemperatureToday = 0.0 |
A holder for the temperature today shared with all TAnimal objects. More... | |
static int | m_DayInYear = 0 |
A holder for the day in year shared with all TAnimal objects. More... | |
Skylark_Base::Skylark_Base | ( | int | x, |
int | y, | ||
SkTerritories * | Terrs, | ||
Landscape * | L, | ||
Skylark_Population_Manager * | SPM, | ||
int | bx, | ||
int | by, | ||
int | mh | ||
) |
References m_Born_x, m_Born_y, m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, m_MyHome, m_OurPopulationManager, and m_OurTerritories.
|
inline |
|
staticprotected |
References g_random_fnc().
Referenced by Skylark_Clutch::st_Developing(), Skylark_Nestling::st_Developing(), and Skylark_PreFledgeling::st_Developing().
bool Skylark_Base::InSquare | ( | rectangle | R | ) | const |
References TAnimal::m_Location_x, TAnimal::m_Location_y, rectangle::m_x1, rectangle::m_x2, rectangle::m_y1, and rectangle::m_y2.
|
inlinevirtual |
Reimplemented in Skylark_Nestling.
|
virtual |
References m_Born_x, m_Born_y, m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, m_MyHome, m_OurPopulationManager, m_OurTerritories, and TAnimal::ReinitialiseObject().
Referenced by Skylark_Clutch::ReInit(), Skylark_Nestling::ReInit(), and Skylark_Adult::ReInit().
|
inlineoverridevirtual |
int Skylark_Base::Age |
Referenced by Skylark_Male::DefendTerritory(), Skylark_PreFledgeling::GetFood(), Skylark_Female::GetMigrationMortality(), Skylark_Male::GetMigrationMortality(), Skylark_Nestling::On_FoodSupply(), Skylark_PreFledgeling::OnFarmEvent(), Skylark_Clutch::ReInit(), Skylark_Nestling::ReInit(), Skylark_PreFledgeling::ReInit(), Skylark_Adult::ReInit(), Skylark_Adult::Skylark_Adult(), Skylark_Clutch::Skylark_Clutch(), Skylark_Nestling::Skylark_Nestling(), Skylark_PreFledgeling::Skylark_PreFledgeling(), Skylark_Male::st_CaringForYoung(), Skylark_Clutch::st_Developing(), Skylark_Nestling::st_Developing(), Skylark_PreFledgeling::st_Developing(), Skylark_Female::st_Emigrating(), Skylark_Male::st_Emigrating(), Skylark_Male::st_FindingTerritory(), Skylark_Female::st_Immigrating(), Skylark_Male::st_Immigrating(), Skylark_Nestling::st_Maturing(), Skylark_Male::Step(), and Skylark_Male::SupplyBroodAge().
int Skylark_Base::m_Born_x |
int Skylark_Base::m_Born_y |
TTypesOfSkState Skylark_Base::m_CurrentSkState |
Referenced by Skylark_Female::BeginStep(), Skylark_Male::BeginStep(), Skylark_Clutch::EndStep(), Skylark_Nestling::EndStep(), Skylark_PreFledgeling::EndStep(), Skylark_Male::EndStep(), Skylark_Female::OnBroodDeath(), Skylark_Male::OnBroodDeath(), Skylark_Female::OnClutchDeath(), Skylark_Nestling::OnDeserted(), Skylark_Male::OnEggHatch(), Skylark_Female::OnEggsHatch(), Skylark_Male::OnEvicted(), Skylark_Clutch::OnFarmEvent(), Skylark_Nestling::OnFarmEvent(), Skylark_PreFledgeling::OnFarmEvent(), Skylark_Female::OnFarmEvent(), Skylark_Male::OnFarmEvent(), Skylark_Female::OnMateDying(), Skylark_Male::OnMateDying(), Skylark_Female::OnMateHomeless(), Skylark_Male::OnMateLeaving(), Skylark_Clutch::OnMumGone(), Skylark_Male::OnPairing(), Skylark_Male::OnPreFledgelingMature(), Skylark_Male::OnReHouse(), Skylark_Female::OnStopFeedingChicks(), Skylark_Nestling::OnYouHaveBeenEaten(), ReInit(), Skylark_PreFledgeling::ReInit(), Skylark_Female::SensibleCopy(), Skylark_Male::SensibleCopy(), Skylark_Base(), Skylark_PreFledgeling::Skylark_PreFledgeling(), Skylark_Clutch::st_Dying(), Skylark_Nestling::st_Dying(), Skylark_PreFledgeling::st_Dying(), Skylark_Female::st_Dying(), Skylark_Male::st_Dying(), Skylark_Male::st_FollowingMate(), Skylark_Clutch::Step(), Skylark_Nestling::Step(), Skylark_PreFledgeling::Step(), Skylark_Female::Step(), and Skylark_Male::Step().
int Skylark_Base::m_MyHome |
The vegetation type where the skylark was born.
Referenced by Skylark_Adult::CopyMyself(), ReInit(), Skylark_Base(), Skylark_Clutch::st_Hatching(), Skylark_Nestling::st_Maturing(), and Skylark_PreFledgeling::st_Maturing().
Skylark_Population_Manager* Skylark_Base::m_OurPopulationManager |
Referenced by Skylark_Adult::CopyMyself(), Skylark_Male::EstablishingATerritory(), Skylark_Female::EstablishTerritory(), Skylark_PreFledgeling::GetFledgelingEM(), Skylark_PreFledgeling::GetFood(), Skylark_Female::GetMigrationMortality(), Skylark_Male::GetMigrationMortality(), Skylark_Nestling::OnDeserted(), Skylark_Male::OnEvicted(), Skylark_Female::OnMateDying(), Skylark_Female::OnMateHomeless(), Skylark_Nestling::OnYouHaveBeenEaten(), ReInit(), Skylark_Adult::RemoveEM(), Skylark_Base(), Skylark_Male::st_Arriving(), Skylark_Clutch::st_Developing(), Skylark_Nestling::st_Developing(), Skylark_Female::st_Dying(), Skylark_Female::st_Floating(), Skylark_Male::st_Floating(), Skylark_Female::st_GivingUpTerritory(), Skylark_Clutch::st_Hatching(), Skylark_Female::st_Incubating(), Skylark_Female::st_Laying(), Skylark_Nestling::st_Maturing(), Skylark_PreFledgeling::st_Maturing(), Skylark_Female::st_StartingNewBrood(), Skylark_Female::st_StoppingBreeding(), Skylark_Female::Step(), and Skylark_Male::Step().
SkTerritories* Skylark_Base::m_OurTerritories |
Referenced by Skylark_Male::ConstructAHabitatTable(), Skylark_Adult::CopyMyself(), Skylark_Male::EstablishingATerritory(), Skylark_Female::EstablishTerritory(), Skylark_Male::OnEvicted(), Skylark_Female::OnMateDying(), Skylark_Male::OnMateLeaving(), Skylark_Male::OnReHouse(), Skylark_Male::ReEvaluateTerritory(), ReInit(), Skylark_Base(), Skylark_Male::st_AttractingAMate(), Skylark_Female::st_Dying(), Skylark_Male::st_Dying(), Skylark_Female::st_Finding_Territory(), Skylark_Male::st_FindingTerritory(), Skylark_Male::st_FollowingMate(), Skylark_Female::st_GivingUpTerritory(), Skylark_Clutch::st_Hatching(), Skylark_Female::st_Laying(), Skylark_Nestling::st_Maturing(), Skylark_PreFledgeling::st_Maturing(), and Skylark_Female::st_StoppingBreeding().
double Skylark_Base::m_Size |
Referenced by Skylark_Adult::CopyMyself(), Skylark_Nestling::On_FoodSupply(), Skylark_Nestling::ReInit(), Skylark_PreFledgeling::ReInit(), Skylark_Adult::ReInit(), Skylark_Adult::Skylark_Adult(), Skylark_Nestling::Skylark_Nestling(), Skylark_PreFledgeling::Skylark_PreFledgeling(), Skylark_Male::st_CaringForYoung(), Skylark_Nestling::st_Developing(), Skylark_PreFledgeling::st_Developing(), Skylark_Nestling::st_Maturing(), and Skylark_PreFledgeling::st_Maturing().