|
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <skylarks_all.h>
|
| Skylark_PreFledgeling (int x, int y, Landscape *L, SkTerritories *Terrs, Skylark_Male *Daddy, bool sex, double size, int age, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
|
virtual void | ReInit (int x, int y, Landscape *L, SkTerritories *Terrs, Skylark_Male *Daddy, bool sex, double size, int age, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
|
void | BeginStep (void) override |
| BeingStep behaviour - must be implemented in descendent classes. More...
|
|
void | Step (void) override |
| Step behaviour - must be implemented in descendent classes. More...
|
|
void | EndStep (void) override |
| EndStep behaviour - must be implemented in descendent classes. More...
|
|
| Skylark_Nestling (int x, int y, Skylark_Male *Daddy, Landscape *L, SkTerritories *Terrs, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
|
virtual void | ReInit (int x, int y, Skylark_Male *Daddy, Landscape *L, SkTerritories *Terrs, Skylark_Population_Manager *SPM, int bx, int by, int mh) |
|
double | On_FoodSupply (double food) override |
|
void | OnDadDead () |
|
void | OnYouHaveBeenEaten () |
|
void | OnDeserted () |
|
| 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) |
|
void | AddStriglingMort (const int lifestage) const |
|
int | WhatState () override |
| Returns the objects current state number. More...
|
|
bool | InSquare (rectangle R) const |
|
| 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...
|
|
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...
|
|
void | ReinitialiseObjectBase () |
| Used to initialise an object. More...
|
|
| TALMaSSObject () |
| The constructor for TALMaSSObject. More...
|
|
virtual | ~TALMaSSObject ()=default |
| The destructor for TALMaSSObject. More...
|
|
◆ Skylark_PreFledgeling()
Skylark_PreFledgeling::Skylark_PreFledgeling |
( |
int |
x, |
|
|
int |
y, |
|
|
Landscape * |
L, |
|
|
SkTerritories * |
Terrs, |
|
|
Skylark_Male * |
Daddy, |
|
|
bool |
sex, |
|
|
double |
size, |
|
|
int |
age, |
|
|
Skylark_Population_Manager * |
SPM, |
|
|
int |
bx, |
|
|
int |
by, |
|
|
int |
mh |
|
) |
| |
◆ BeginStep()
void Skylark_PreFledgeling::BeginStep |
( |
void |
| ) |
|
|
overridevirtual |
◆ EndStep()
void Skylark_PreFledgeling::EndStep |
( |
void |
| ) |
|
|
overridevirtual |
EndStep behaviour - must be implemented in descendent classes.
Reimplemented from Skylark_Nestling.
3339 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3344 if ( !Dad->DoIExistP(
this ) ) {
3345 g_land->
Warn(
"Skylark_PreFeldgeling::EndStep(): DeBug5 ", NULL );
3351 case toss_PDeveloping:
3355 #ifdef TEST_ISSUE_DEATH_WARRANT
3356 printf(
"Skylark_PreFledgeling::EndStep() : st_Developing() : %d\n", (
int )
g_date->
Date() );
3372 g_land->
Warn(
"Skylark_PreFledling::EndStep(): Maturing ",
nullptr);
3384 #ifdef __PESTICIDE_RA
3385 PesticideResponse();
References Calendar::Date(), g_date, g_land, Skylark_Base::m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, TALMaSSObject::m_StepDone, st_Developing(), st_Dying(), st_Maturing(), and Landscape::Warn().
◆ GetFledgelingEM()
double Skylark_PreFledgeling::GetFledgelingEM |
( |
int |
Age | ) |
const |
|
protected |
◆ GetFood()
double Skylark_PreFledgeling::GetFood |
( |
| ) |
const |
|
protected |
◆ OnFarmEvent()
bool Skylark_PreFledgeling::OnFarmEvent |
( |
FarmToDo |
| ) |
|
|
overrideprotectedvirtual |
Must be reimplemented if used in descendent classes. Sets the action on a management event.
Reimplemented from Skylark_Nestling.
3261 #ifdef TEST_ISSUE_DEATH_WARRANT
3262 printf(
"Skylark_PreFledgeling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
3271 #ifdef TEST_ISSUE_DEATH_WARRANT
3272 printf(
"Skylark_PreFledgeling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
3281 #ifndef __NoStriglingEffect
3284 #ifdef TEST_ISSUE_DEATH_WARRANT
3285 printf(
"Skylark_PreFledgeling::OnFarmEvent() : %d : %d\n", event, (
int )
g_date->
Date() );
References Skylark_Base::AddStriglingMort(), Skylark_Base::Age, autumn_harrow, autumn_or_spring_plough, autumn_plough, autumn_roll, autumn_sow, autumn_sow_with_ferti, bed_forming, biocide, bulb_harvest, burn_straw_stubble, burn_top, cattle_out, cattle_out_low, cfg_insecticide_direct_mortP, cut_to_hay, cut_to_silage, cut_weeds, Calendar::Date(), deep_ploughing, Landscape::EventtypeToString(), fa_ammoniumsulphate, fa_boron, fa_calcium, fa_cu, fa_greenmanure, fa_k, fa_manganesesulphate, fa_manure, fa_n, fa_nk, fa_npk, fa_npks, fa_p, fa_pk, fa_pks, fa_rsm, fa_sk, fa_sludge, fa_slurry, fiber_covering, fiber_removal, flammebehandling, flower_cutting, fp_ammoniumsulphate, fp_boron, fp_calcium, fp_cu, fp_greenmanure, fp_k, fp_liquidNH3, fp_manganesesulphate, fp_manure, fp_n, fp_nc, fp_nk, fp_npk, fp_npks, fp_ns, fp_p, fp_pk, fp_pks, fp_rsm, fp_sk, fp_sludge, fp_slurry, fungicide_treat, g_date, g_land, g_random_fnc(), glyphosate, green_harvest, growth_regulator, harvest, harvest_bushfruit, harvestshoots, hay_bailing, hay_turning, heavy_cultivator_aggregate, herbicide_treat, hilling_up, insecticide_treat, last_treatment, Skylark_Base::m_CurrentSkState, TAnimal::m_OurLandscape, manual_weeding, molluscicide, mow, org_fungicide, org_herbicide, org_insecticide, pheromone, pigs_out, preseeding_cultivator, preseeding_cultivator_sow, product_treat, pruning, row_cultivation, shallow_harrow, shredding, sleep_all_day, spring_harrow, spring_plough, spring_roll, spring_sow, spring_sow_with_ferti, straw_chopping, straw_covering, straw_removal, strigling, strigling_hill, strigling_sow, stubble_cultivator_heavy, stubble_harrowing, stubble_plough, suckering, summer_harrow, summer_plough, summer_sow, swathing, syninsecticide_treat, trial_control, trial_insecticidetreat, trial_toxiccontrol, CfgInt::value(), Landscape::Warn(), water, winter_harrow, and winter_plough.
◆ ReInit()
void Skylark_PreFledgeling::ReInit |
( |
int |
x, |
|
|
int |
y, |
|
|
Landscape * |
L, |
|
|
SkTerritories * |
Terrs, |
|
|
Skylark_Male * |
Daddy, |
|
|
bool |
sex, |
|
|
double |
size, |
|
|
int |
age, |
|
|
Skylark_Population_Manager * |
SPM, |
|
|
int |
bx, |
|
|
int |
by, |
|
|
int |
mh |
|
) |
| |
|
virtual |
◆ st_Developing()
int Skylark_PreFledgeling::st_Developing |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ st_Dying()
void Skylark_PreFledgeling::st_Dying |
( |
void |
| ) |
|
|
overrideprotectedvirtual |
◆ st_Maturing()
void Skylark_PreFledgeling::st_Maturing |
( |
| ) |
|
|
overrideprotectedvirtual |
Reimplemented from Skylark_Nestling.
3459 if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
References Skylark_Population_Manager::CreateObjects(), Skylark_Base::m_Born_x, Skylark_Base::m_Born_y, Skylark_Nestling::m_Dad, TAnimal::m_Location_x, TAnimal::m_Location_y, Skylark_Base::m_MyHome, TAnimal::m_OurLandscape, Skylark_Base::m_OurPopulationManager, Skylark_Base::m_OurTerritories, Skylark_Base::m_Size, Skylark_Male::OnPreFledgelingMature(), Skylark_Nestling::Sex, and Skylark_struct::x.
Referenced by EndStep().
◆ Step()
void Skylark_PreFledgeling::Step |
( |
void |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files:
Definition: Treatment.h:129
Definition: Treatment.h:64
Definition: Treatment.h:84
Definition: Treatment.h:71
double m_EM
Definition: skylarks_all.h:596
Definition: Treatment.h:88
Definition: Treatment.h:68
Definition: Treatment.h:144
Definition: Treatment.h:52
Definition: Treatment.h:89
Definition: Treatment.h:94
Definition: Treatment.h:142
void AddStriglingMort(const int lifestage) const
Definition: skylarks_all.h:531
Definition: Treatment.h:83
Definition: Treatment.h:99
Definition: Treatment.h:76
Definition: Treatment.h:35
Definition: Treatment.h:81
Definition: Treatment.h:43
Definition: Treatment.h:91
Definition: Treatment.h:127
Definition: Treatment.h:103
Definition: Treatment.h:121
Landscape * g_land
Definition: skylarks_all.cpp:44
Definition: Treatment.h:44
Definition: Treatment.h:56
Definition: Treatment.h:125
TTypesOfSkState m_CurrentSkState
Definition: skylarks_all.h:517
Definition: Treatment.h:61
Definition: Treatment.h:80
Definition: Treatment.h:60
class Calendar * g_date
Definition: Calendar.cpp:37
Definition: Treatment.h:90
Definition: Treatment.h:123
Definition: Treatment.h:131
double SupplyEMi() const
Definition: skylarks_all.h:492
Definition: Treatment.h:138
Definition: Treatment.h:122
Definition: Treatment.h:39
Definition: Treatment.h:110
Definition: Treatment.h:51
Definition: Treatment.h:143
Definition: Treatment.h:133
int m_Born_y
Definition: skylarks_all.h:521
Definition: Treatment.h:104
Definition: Treatment.h:85
int x
Definition: skylarks_all.h:209
SkTerritories * m_OurTerritories
Definition: skylarks_all.h:525
Definition: Treatment.h:140
Definition: Treatment.h:38
Definition: Treatment.h:117
Definition: Treatment.h:120
virtual void ReInit(int x, int y, Skylark_Male *Daddy, Landscape *L, SkTerritories *Terrs, Skylark_Population_Manager *SPM, int bx, int by, int mh)
Definition: skylarks_all.cpp:2635
Definition: Treatment.h:59
Definition: Treatment.h:100
Definition: Treatment.h:150
Definition: Treatment.h:124
Definition: Treatment.h:139
Definition: Treatment.h:126
Definition: Treatment.h:149
Definition: Treatment.h:132
Definition: Treatment.h:148
Definition: Treatment.h:67
Definition: Treatment.h:42
Definition: Treatment.h:65
Skylark_Male * m_Dad
Definition: skylarks_all.h:595
Definition: Treatment.h:45
Definition: Treatment.h:98
bool Sex
Definition: skylarks_all.h:591
int m_MyHome
The vegetation type where the skylark was born.
Definition: skylarks_all.h:523
Definition: Treatment.h:77
Definition: Treatment.h:96
Definition: Treatment.h:54
Definition: Treatment.h:130
Definition: Treatment.h:97
Definition: Treatment.h:141
double m_GrNeed
Definition: skylarks_all.h:597
long Date(void)
Definition: Calendar.h:57
int m_Location_y
The objects ALMaSS y coordinate.
Definition: PopulationManager.h:366
Definition: Treatment.h:70
Definition: Treatment.h:46
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
void CheckManagement()
Used to start a check for any management related effects at the objects current location.
Definition: PopulationManager.cpp:1591
Skylark_Nestling(int x, int y, Skylark_Male *Daddy, Landscape *L, SkTerritories *Terrs, Skylark_Population_Manager *SPM, int bx, int by, int mh)
Definition: skylarks_all.cpp:2617
static bool DailyMortality(int mort)
Definition: skylarks_all.cpp:2092
int Age
Definition: skylarks_all.h:518
Definition: Treatment.h:111
Definition: Treatment.h:135
Definition: Treatment.h:82
Definition: Treatment.h:63
Definition: Treatment.h:62
Definition: Treatment.h:119
Definition: Treatment.h:72
Definition: Treatment.h:112
Definition: Treatment.h:137
Definition: Treatment.h:40
Definition: Treatment.h:53
Definition: Treatment.h:145
Definition: Treatment.h:86
Definition: Treatment.h:49
Definition: Treatment.h:95
Definition: Treatment.h:147
Definition: Treatment.h:36
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:133
Definition: Treatment.h:116
Definition: Treatment.h:93
Definition: Treatment.h:114
int value() const
Definition: Configurator.h:116
Definition: Treatment.h:75
Definition: Treatment.h:47
Definition: Treatment.h:106
Definition: Treatment.h:109
Definition: Treatment.h:48
int m_Born_x
Definition: skylarks_all.h:520
std::string EventtypeToString(int a_event)
Returns the text representation of a treatment type.
Definition: Landscape.cpp:6024
static int PreFledgeMortProb
Definition: skylarks_all.cpp:160
Definition: Treatment.h:146
Definition: Treatment.h:134
Definition: Treatment.h:118
Definition: Treatment.h:113
void OnPreFledgelingDeath(const Skylark_PreFledgeling *P)
Definition: skylarks_all.cpp:4281
double m_Size
Definition: skylarks_all.h:519
Definition: skylarks_all.h:248
Definition: Treatment.h:41
Skylark_Population_Manager * m_OurPopulationManager
Definition: skylarks_all.h:526
Definition: Treatment.h:37
Definition: Treatment.h:79
Definition: Treatment.h:74
void CreateObjects(int ob_type, TAnimal *pTAo, void *null, Skylark_struct *data, int number)
Definition: skylarks_all.cpp:539
Definition: Treatment.h:136
Definition: Treatment.h:108
Definition: Treatment.h:69
Definition: Treatment.h:105
Definition: Treatment.h:78
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
Definition: Treatment.h:66
Definition: Treatment.h:92
Definition: Treatment.h:102
void st_Dying() override
Definition: skylarks_all.cpp:3391
Definition: Treatment.h:57
Definition: Treatment.h:87
CfgInt cfg_insecticide_direct_mortP
void OnPreFledgelingMature(const Skylark_PreFledgeling *P)
Definition: skylarks_all.cpp:4319
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131
Definition: Treatment.h:101
int st_Developing() override
Definition: skylarks_all.cpp:3402
Definition: Treatment.h:73
Definition: Treatment.h:55
void Warn(std::string a_msg1, std::string a_msg2)
Wrapper for the g_msg Warn function.
Definition: Landscape.h:2250
Definition: Treatment.h:34
int m_Location_x
The objects ALMaSS x coordinate.
Definition: PopulationManager.h:362
Definition: Treatment.h:58
Definition: Treatment.h:128
Definition: Treatment.h:50
void st_Maturing() override
Definition: skylarks_all.cpp:3457
Definition: Treatment.h:115
Definition: Treatment.h:33
Definition: Treatment.h:107