ALMaSS  1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
Skylark_PreFledgeling Class Reference

#include <skylarks_all.h>

Inheritance diagram for Skylark_PreFledgeling:
Skylark_Nestling Skylark_Base TAnimal TALMaSSObject

Public Member Functions

 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...
 
- Public Member Functions inherited from Skylark_Nestling
 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 ()
 
- Public Member Functions inherited from Skylark_Base
 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
 
- 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...
 
- 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...
 
void ReinitialiseObjectBase ()
 Used to initialise an object. More...
 
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
 
virtual ~TALMaSSObject ()=default
 The destructor for TALMaSSObject. More...
 

Protected Member Functions

int st_Developing () override
 
void st_Maturing () override
 
void st_Dying () override
 
double GetFood () const
 
double GetFledgelingEM (int Age) const
 
bool OnFarmEvent (FarmToDo event) override
 Must be reimplemented if used in descendent classes. Sets the action on a management event. More...
 
- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 

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...
 
- Public Attributes inherited from Skylark_Base
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...
 
SkTerritoriesm_OurTerritories
 
Skylark_Population_Managerm_OurPopulationManager
 
- Static Protected Member Functions inherited from Skylark_Base
static bool DailyMortality (int mort)
 
- Protected Attributes inherited from Skylark_Nestling
bool Sex
 
int m_EM_fail
 
int m_NestLeavingChance
 
Skylark_Malem_Dad
 
double m_EM
 
double m_GrNeed
 
- 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 Landscapem_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...
 

Constructor & Destructor Documentation

◆ 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 
)
3115  : Skylark_Nestling(x, y, Daddy, L, Terrs, SPM, bx, by, mh) {
3116  Sex = sex; // must be reset because the nestling constructor can change it
3117  m_Size = size;
3118  Age = age;
3119  m_EM = 0;
3120  m_GrNeed = 0;
3121  m_CurrentSkState = toss_PDeveloping; // must develop today
3122 }

References Skylark_Base::Age, Skylark_Base::m_CurrentSkState, Skylark_Nestling::m_EM, Skylark_Nestling::m_GrNeed, Skylark_Base::m_Size, and Skylark_Nestling::Sex.

Member Function Documentation

◆ BeginStep()

void Skylark_PreFledgeling::BeginStep ( void  )
overridevirtual

BeingStep behaviour - must be implemented in descendent classes.

Reimplemented from Skylark_Nestling.

3302 { CheckManagement(); }

References TAnimal::CheckManagement().

◆ EndStep()

void Skylark_PreFledgeling::EndStep ( void  )
overridevirtual

EndStep behaviour - must be implemented in descendent classes.

Reimplemented from Skylark_Nestling.

3337  {
3338 #ifdef __CJTDebug_5
3339  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3340 #endif
3341  if (m_CurrentSkState == toss_Destroy) return;
3342 #ifdef __CJTDebug_5
3343  if ( Dad )
3344  if ( !Dad->DoIExistP( this ) ) {
3345  g_land->Warn( "Skylark_PreFeldgeling::EndStep(): DeBug5 ", NULL );
3346  exit( 1 );
3347  }
3348 #endif
3349  switch (m_CurrentSkState)
3350  {
3351  case toss_PDeveloping: // Develop
3352  switch (st_Developing())
3353  {
3354  case 2:
3355 #ifdef TEST_ISSUE_DEATH_WARRANT
3356  printf( "Skylark_PreFledgeling::EndStep() : st_Developing() : %d\n", ( int )g_date->Date() );
3357 #endif
3358  m_CurrentSkState = toss_PDying; // -> die
3359  break;
3360  case 1:
3361  m_CurrentSkState = toss_PMaturing; // -> Maturing
3362  // This state must be completed now so make the call from here to stop
3363  // it being made the next day
3364  st_Maturing();
3365  m_CurrentSkState = toss_Destroy; // will kill it at end of step!
3366  m_CurrentStateNo = -1;
3367  m_StepDone = true;
3368  break;
3369  }
3370  break;
3371  case 8: // Maturing
3372  g_land->Warn("Skylark_PreFledling::EndStep(): Maturing ", nullptr);
3373  exit(1);
3374  case 9: // Dying
3375  st_Dying();
3376  m_StepDone = true;
3377  break;
3378  default:
3379  /* char errornum[20]; sprintf(errornum, "%d", m_CurrentSkState );
3380  g_land->Warn("Skylark_PreFledgeling::EndStep(): Unknown state: ", errornum); exit(0); */
3381  break;
3382  }
3383  // Need to find out if it is poisoned
3384 #ifdef __PESTICIDE_RA
3385  PesticideResponse();
3386 #endif
3387 }

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
3446  {
3447 #ifdef __CJTDebug_5
3448  if ( IsAlive() != 0xDEADC0DE )
3449  DEADCODEError();
3450 #endif
3451  // Speed optimisation - this is the same for every bird so done in PopMan
3452  return m_OurPopulationManager->SupplyEMi(); // in gdw needed
3453 }

References Skylark_Base::m_OurPopulationManager, and Skylark_Population_Manager::SupplyEMi().

◆ GetFood()

double Skylark_PreFledgeling::GetFood ( ) const
protected
3426  {
3427 #ifdef __CJTDebug_5
3428  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3429 #endif
3430  // Food it obtained from the local area
3431  // This will depend upon the habitat quality/weather & searching efficiency
3432  // This is possibly too complicated just now so:
3433  // First prototype model will assume that for the last 10 days the birds
3434  // can find 10% of their need for each day after 20 days so at 30 days they
3435  // are completely independent and cannot starve
3436 
3437  // 1st prototype
3438  double food;
3439  if (Age >= 20) { food = m_OurPopulationManager->SupplyEMi() * 0.1 * (Age - 20); }
3440  else food = 0;
3441  return food;
3442 }

References Skylark_Base::Age, Skylark_Base::m_OurPopulationManager, and Skylark_Population_Manager::SupplyEMi().

◆ 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.

3137  {
3138  switch (event)
3139  {
3140  case sleep_all_day:
3141  break;
3142 // Here begins non-mortality events
3143  case fp_npks:
3144  case fp_npk:
3145  case fp_pk:
3146  case fp_k:
3147  case fp_sk:
3148  case fp_p:
3149  case fp_slurry:
3150  case fp_ammoniumsulphate:
3151  case fp_manganesesulphate:
3152  case fp_manure:
3153  case fp_greenmanure:
3154  case fp_sludge:
3155  case fp_boron:
3156  case fp_cu:
3157  case fp_n:
3158  case fp_nc:
3159  case fp_nk:
3160  case fp_ns:
3161  case fp_pks:
3162  case fp_rsm:
3163  case fp_calcium:
3164  case fa_npks:
3165  case fa_npk:
3166  case fa_n:
3167  case fa_pk:
3168  case fa_k:
3169  case fa_boron:
3170  case fa_cu:
3171  case fa_nk:
3172  case fa_pks:
3173  case fa_sk:
3174  case fa_p:
3175  case fa_slurry:
3176  case fa_ammoniumsulphate:
3177  case fa_manganesesulphate:
3178  case fa_manure:
3179  case fa_greenmanure:
3180  case fa_sludge:
3181  case fa_rsm:
3182  case fa_calcium:
3183  case herbicide_treat:
3184  case growth_regulator:
3185  case fungicide_treat:
3186  case insecticide_treat:
3188  case molluscicide:
3189  case water:
3190  case straw_covering:
3191  case straw_removal:
3192  case fiber_covering:
3193  case fiber_removal:
3194  case fp_liquidNH3:
3195  case manual_weeding:
3196  case product_treat:
3197  case glyphosate:
3198  case biocide:
3199  case org_insecticide:
3200  case last_treatment:
3201  case org_fungicide:
3202  case org_herbicide:
3203  case pheromone:
3204  case suckering:
3205  case trial_control:
3206  case trial_toxiccontrol:
3207 /*\todo should the below not have an effect? */
3208  case swathing:
3209  case row_cultivation:
3210  case harvest:
3211  case green_harvest:
3212  case harvestshoots:
3213  case harvest_bushfruit:
3214  case cattle_out:
3215  case cattle_out_low:
3216  case hay_bailing:
3217  case mow:
3218  case cut_weeds:
3219  case pruning:
3220  case pigs_out:
3221  break;
3222 // Here begins soil cultivation and cutting mortality
3223  case stubble_plough:
3226  case autumn_harrow:
3227  case preseeding_cultivator:
3229  case autumn_roll:
3230  case autumn_sow:
3231  case autumn_sow_with_ferti:
3232  case winter_plough:
3233  case deep_ploughing:
3234  case spring_plough:
3235  case spring_harrow:
3236  case shallow_harrow:
3237  case spring_roll:
3238  case winter_harrow:
3239  case summer_harrow:
3240  case summer_plough:
3241  case summer_sow:
3242  case spring_sow:
3243  case spring_sow_with_ferti:
3244  case autumn_plough:
3245  case hilling_up:
3246  case cut_to_hay:
3247  case cut_to_silage:
3248  case straw_chopping:
3249  case hay_turning:
3250  case stubble_harrowing:
3252  case burn_straw_stubble:
3253  case burn_top:
3254  case flammebehandling:
3255  case shredding:
3256  case bed_forming:
3257  case flower_cutting:
3258  case bulb_harvest:
3259  if (Age <= 20)
3260  {
3261 #ifdef TEST_ISSUE_DEATH_WARRANT
3262  printf( "Skylark_PreFledgeling::OnFarmEvent() : %d : %d\n", event, ( int )g_date->Date() );
3263 #endif
3264  m_CurrentSkState = toss_PDying;
3265  }
3266  break;
3267 // Here begins spray mortality
3268  case syninsecticide_treat:
3270  {
3271 #ifdef TEST_ISSUE_DEATH_WARRANT
3272  printf( "Skylark_PreFledgeling::OnFarmEvent() : %d : %d\n", event, ( int )g_date->Date() );
3273 #endif
3274  m_CurrentSkState = toss_PDying;
3275  }
3276  break;
3277 // Here begins strigling mortality
3278  case strigling_sow:
3279  case strigling:
3280  case strigling_hill:
3281 #ifndef __NoStriglingEffect
3282  if (Age <= 20 && g_random_fnc(100) < 50)
3283  {
3284 #ifdef TEST_ISSUE_DEATH_WARRANT
3285  printf( "Skylark_PreFledgeling::OnFarmEvent() : %d : %d\n", event, ( int )g_date->Date() );
3286 #endif
3287  m_CurrentSkState = toss_PDying;
3288  AddStriglingMort(3);
3289  }
3290 #endif
3291  break;
3292  default:
3293  g_land->Warn("Skylark_PreFledgeling::OnFarmEvent(): ""Unknown event type:", m_OurLandscape->EventtypeToString(event));
3294  exit(1);
3295  }
3296  if (m_CurrentSkState == toss_PDying) return true;
3297  return false;
3298 }

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
3126  {
3127  Skylark_Nestling::ReInit(x, y, Daddy, L, Terrs, SPM, bx, by, mh);
3128  Sex = sex; // must be reset because the nestling constructor can change it
3129  m_Size = size;
3130  Age = age;
3131  m_EM = 0;
3132  m_GrNeed = 0;
3133  m_CurrentSkState = toss_PDeveloping; // must develop today
3134 }

References Skylark_Base::Age, Skylark_Base::m_CurrentSkState, Skylark_Nestling::m_EM, Skylark_Nestling::m_GrNeed, Skylark_Base::m_Size, Skylark_Nestling::ReInit(), and Skylark_Nestling::Sex.

◆ st_Developing()

int Skylark_PreFledgeling::st_Developing ( )
overrideprotectedvirtual

Reimplemented from Skylark_Nestling.

3402  {
3403 #ifdef __CJTDebug_5
3404  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3405 #endif
3406  // Timing: called at the end of each day
3408  {
3409  //m_OurPopulationManager->WriteToTest2File(m_OurLandscape->SupplyDayInYear(),3001);
3410  return 2; //transfer to state die
3411  }
3412  if (Age++ == 31)
3413  {
3414  //m_OurPopulationManager->WriteToTest2File((int)3000, 3000);
3415  m_Size = 38.0; // Give it a size
3416  return 1; // Next stage
3417  }
3418  // Get Next days EM
3419  m_EM = 0; // m_OurPopulationManager->SupplyEMi(); // KCal
3420  m_GrNeed = 0; // gdw
3421  return 0; // still developing
3422 }

References Skylark_Base::Age, Skylark_Base::DailyMortality(), Skylark_Nestling::m_EM, Skylark_Nestling::m_GrNeed, Skylark_Base::m_Size, and PreFledgeMortProb.

Referenced by EndStep().

◆ st_Dying()

void Skylark_PreFledgeling::st_Dying ( void  )
overrideprotectedvirtual

Reimplemented from Skylark_Nestling.

3391  {
3392 #ifdef __CJTDebug_5
3393  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3394 #endif
3395  if (m_Dad != nullptr) m_Dad->OnPreFledgelingDeath(this);
3396  m_CurrentSkState = toss_Destroy; // will kill it at end of step!
3397  m_CurrentStateNo = -1;
3398 }

References Skylark_Base::m_CurrentSkState, TALMaSSObject::m_CurrentStateNo, Skylark_Nestling::m_Dad, and Skylark_Male::OnPreFledgelingDeath().

Referenced by EndStep().

◆ st_Maturing()

void Skylark_PreFledgeling::st_Maturing ( )
overrideprotectedvirtual

Reimplemented from Skylark_Nestling.

3457  {
3458 #ifdef __CJTDebug_5
3459  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3460 #endif
3461  // Timing: occurs at the end of the day
3462  // Mortality after this time, until they return is taken up in the
3463  // immigration mortality (total 35%)
3464  const auto aps = new AdultSkylark_struct;
3465  aps->x = m_Location_x;
3466  aps->y = m_Location_y;
3467  aps->size = m_Size;
3468  aps->Terrs = m_OurTerritories;
3469  aps->L = m_OurLandscape;
3470  aps->sex = Sex;
3471  aps->age = 0;
3472  aps->bx = m_Born_x;
3473  aps->mh = m_MyHome;
3474  aps->by = m_Born_y;
3475  if (Sex == true) m_OurPopulationManager->CreateObjects(3, this, nullptr, aps, 1);
3476  else m_OurPopulationManager->CreateObjects(4, this, nullptr, aps, 1);
3477  // object will be destroyed by death state
3478  // but must let Dad know anyway
3479  delete aps;
3480  if (m_Dad != nullptr) m_Dad->OnPreFledgelingMature(this);
3481  // m_OurPopulationManager->WriteToTest2File(3,3);
3482 }

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

Step behaviour - must be implemented in descendent classes.

Reimplemented from Skylark_Nestling.

3306  {
3307 #ifdef __CJTDebug_5
3308  if ( IsAlive() != 0x0DEADC0DE ) DEADCODEError();
3309 #endif
3310  if (m_StepDone) return;
3311  switch (m_CurrentSkState)
3312  {
3313  case toss_Initiation: // Initial
3314  // Should never access this code becuase it should go
3315  // to m_CurrentSkState=toss_PDeveloping;
3316  g_land->Warn("Skylark_PreFeldgeling::Step(): Ilegal ", nullptr);
3317  exit(1);
3318  case toss_PDeveloping: // Develop
3319  m_StepDone = true;
3320  break;
3321  case toss_PMaturing: // Maturing
3322  m_StepDone = true;
3323  break;
3324  case toss_PDying: // Dying
3325  m_StepDone = true;
3326  break;
3327  case toss_Destroy:
3328  m_StepDone = true;
3329  break;
3330  default:
3331  g_land->Warn("Skylark_PreFeldgeling::Step(): Unknown State ", nullptr);
3332  exit(1);
3333  }
3334 }

References g_land, Skylark_Base::m_CurrentSkState, TALMaSSObject::m_StepDone, and Landscape::Warn().


The documentation for this class was generated from the following files:
fiber_removal
Definition: Treatment.h:129
fp_rsm
Definition: Treatment.h:64
org_insecticide
Definition: Treatment.h:84
fa_sk
Definition: Treatment.h:71
Skylark_Nestling::m_EM
double m_EM
Definition: skylarks_all.h:596
row_cultivation
Definition: Treatment.h:88
fa_pk
Definition: Treatment.h:68
winter_harrow
Definition: Treatment.h:144
fp_npk
Definition: Treatment.h:52
strigling
Definition: Treatment.h:89
harvest
Definition: Treatment.h:94
fa_nk
Definition: Treatment.h:142
Skylark_Base::AddStriglingMort
void AddStriglingMort(const int lifestage) const
Definition: skylarks_all.h:531
insecticide_treat
Definition: Treatment.h:83
straw_chopping
Definition: Treatment.h:99
fa_greenmanure
Definition: Treatment.h:76
stubble_plough
Definition: Treatment.h:35
growth_regulator
Definition: Treatment.h:81
deep_ploughing
Definition: Treatment.h:43
hilling_up
Definition: Treatment.h:91
green_harvest
Definition: Treatment.h:127
autumn_or_spring_plough
Definition: Treatment.h:103
flower_cutting
Definition: Treatment.h:121
g_land
Landscape * g_land
Definition: skylarks_all.cpp:44
spring_plough
Definition: Treatment.h:44
fp_sk
Definition: Treatment.h:56
pruning
Definition: Treatment.h:125
Skylark_Base::m_CurrentSkState
TTypesOfSkState m_CurrentSkState
Definition: skylarks_all.h:517
fp_manure
Definition: Treatment.h:61
herbicide_treat
Definition: Treatment.h:80
fp_ammoniumsulphate
Definition: Treatment.h:60
g_date
class Calendar * g_date
Definition: Calendar.cpp:37
flammebehandling
Definition: Treatment.h:90
straw_covering
Definition: Treatment.h:123
fp_boron
Definition: Treatment.h:131
Skylark_Population_Manager::SupplyEMi
double SupplyEMi() const
Definition: skylarks_all.h:492
fp_cu
Definition: Treatment.h:138
bulb_harvest
Definition: Treatment.h:122
preseeding_cultivator
Definition: Treatment.h:39
trial_control
Definition: Treatment.h:110
fp_npks
Definition: Treatment.h:51
burn_top
Definition: Treatment.h:143
fp_nk
Definition: Treatment.h:133
Skylark_Base::m_Born_y
int m_Born_y
Definition: skylarks_all.h:521
burn_straw_stubble
Definition: Treatment.h:104
org_herbicide
Definition: Treatment.h:85
Skylark_struct::x
int x
Definition: skylarks_all.h:209
Skylark_Base::m_OurTerritories
SkTerritories * m_OurTerritories
Definition: skylarks_all.h:525
fa_cu
Definition: Treatment.h:140
autumn_roll
Definition: Treatment.h:38
strigling_hill
Definition: Treatment.h:117
heavy_cultivator_aggregate
Definition: Treatment.h:120
Skylark_Nestling::ReInit
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
fp_manganesesulphate
Definition: Treatment.h:59
hay_turning
Definition: Treatment.h:100
last_treatment
Definition: Treatment.h:150
straw_removal
Definition: Treatment.h:124
fa_n
Definition: Treatment.h:139
shredding
Definition: Treatment.h:126
pheromone
Definition: Treatment.h:149
fp_n
Definition: Treatment.h:132
manual_weeding
Definition: Treatment.h:148
fa_npk
Definition: Treatment.h:67
winter_plough
Definition: Treatment.h:42
fp_calcium
Definition: Treatment.h:65
Skylark_Nestling::m_Dad
Skylark_Male * m_Dad
Definition: skylarks_all.h:595
spring_harrow
Definition: Treatment.h:45
cut_to_silage
Definition: Treatment.h:98
Skylark_Nestling::Sex
bool Sex
Definition: skylarks_all.h:591
Skylark_Base::m_MyHome
int m_MyHome
The vegetation type where the skylark was born.
Definition: skylarks_all.h:523
fa_sludge
Definition: Treatment.h:77
pigs_out
Definition: Treatment.h:96
fp_p
Definition: Treatment.h:54
suckering
Definition: Treatment.h:130
cut_to_hay
Definition: Treatment.h:97
fa_boron
Definition: Treatment.h:141
Skylark_Nestling::m_GrNeed
double m_GrNeed
Definition: skylarks_all.h:597
Calendar::Date
long Date(void)
Definition: Calendar.h:57
TAnimal::m_Location_y
int m_Location_y
The objects ALMaSS y coordinate.
Definition: PopulationManager.h:366
fa_k
Definition: Treatment.h:70
spring_roll
Definition: Treatment.h:46
TAnimal::m_OurLandscape
static Landscape * m_OurLandscape
A pointer to the landscape object shared with all TAnimal objects.
Definition: PopulationManager.h:342
TAnimal::CheckManagement
void CheckManagement()
Used to start a check for any management related effects at the objects current location.
Definition: PopulationManager.cpp:1591
Skylark_Nestling::Skylark_Nestling
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
Skylark_Base::DailyMortality
static bool DailyMortality(int mort)
Definition: skylarks_all.cpp:2092
Skylark_Base::Age
int Age
Definition: skylarks_all.h:518
syninsecticide_treat
Definition: Treatment.h:111
fp_nc
Definition: Treatment.h:135
fungicide_treat
Definition: Treatment.h:82
fp_sludge
Definition: Treatment.h:63
fp_greenmanure
Definition: Treatment.h:62
shallow_harrow
Definition: Treatment.h:119
fa_slurry
Definition: Treatment.h:72
cattle_out_low
Definition: Treatment.h:112
harvest_bushfruit
Definition: Treatment.h:137
preseeding_cultivator_sow
Definition: Treatment.h:40
fp_pk
Definition: Treatment.h:53
fa_pks
Definition: Treatment.h:145
org_fungicide
Definition: Treatment.h:86
summer_harrow
Definition: Treatment.h:49
cattle_out
Definition: Treatment.h:95
harvestshoots
Definition: Treatment.h:147
stubble_cultivator_heavy
Definition: Treatment.h:36
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:133
biocide
Definition: Treatment.h:116
swathing
Definition: Treatment.h:93
glyphosate
Definition: Treatment.h:114
CfgInt::value
int value() const
Definition: Configurator.h:116
fa_manure
Definition: Treatment.h:75
spring_sow
Definition: Treatment.h:47
cut_weeds
Definition: Treatment.h:106
trial_toxiccontrol
Definition: Treatment.h:109
summer_plough
Definition: Treatment.h:48
Skylark_Base::m_Born_x
int m_Born_x
Definition: skylarks_all.h:520
Landscape::EventtypeToString
std::string EventtypeToString(int a_event)
Returns the text representation of a treatment type.
Definition: Landscape.cpp:6024
PreFledgeMortProb
static int PreFledgeMortProb
Definition: skylarks_all.cpp:160
fp_pks
Definition: Treatment.h:146
fp_ns
Definition: Treatment.h:134
bed_forming
Definition: Treatment.h:118
product_treat
Definition: Treatment.h:113
Skylark_Male::OnPreFledgelingDeath
void OnPreFledgelingDeath(const Skylark_PreFledgeling *P)
Definition: skylarks_all.cpp:4281
Skylark_Base::m_Size
double m_Size
Definition: skylarks_all.h:519
AdultSkylark_struct
Definition: skylarks_all.h:248
autumn_sow
Definition: Treatment.h:41
Skylark_Base::m_OurPopulationManager
Skylark_Population_Manager * m_OurPopulationManager
Definition: skylarks_all.h:526
autumn_harrow
Definition: Treatment.h:37
fa_calcium
Definition: Treatment.h:79
fa_ammoniumsulphate
Definition: Treatment.h:74
Skylark_Population_Manager::CreateObjects
void CreateObjects(int ob_type, TAnimal *pTAo, void *null, Skylark_struct *data, int number)
Definition: skylarks_all.cpp:539
autumn_sow_with_ferti
Definition: Treatment.h:136
trial_insecticidetreat
Definition: Treatment.h:108
fa_p
Definition: Treatment.h:69
mow
Definition: Treatment.h:105
fa_rsm
Definition: Treatment.h:78
g_random_fnc
int g_random_fnc(const int a_range)
Definition: ALMaSS_Random.cpp:74
fa_npks
Definition: Treatment.h:66
water
Definition: Treatment.h:92
stubble_harrowing
Definition: Treatment.h:102
Skylark_PreFledgeling::st_Dying
void st_Dying() override
Definition: skylarks_all.cpp:3391
fp_liquidNH3
Definition: Treatment.h:57
molluscicide
Definition: Treatment.h:87
cfg_insecticide_direct_mortP
CfgInt cfg_insecticide_direct_mortP
Skylark_Male::OnPreFledgelingMature
void OnPreFledgelingMature(const Skylark_PreFledgeling *P)
Definition: skylarks_all.cpp:4319
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131
hay_bailing
Definition: Treatment.h:101
Skylark_PreFledgeling::st_Developing
int st_Developing() override
Definition: skylarks_all.cpp:3402
fa_manganesesulphate
Definition: Treatment.h:73
fp_k
Definition: Treatment.h:55
Landscape::Warn
void Warn(std::string a_msg1, std::string a_msg2)
Wrapper for the g_msg Warn function.
Definition: Landscape.h:2250
autumn_plough
Definition: Treatment.h:34
TAnimal::m_Location_x
int m_Location_x
The objects ALMaSS x coordinate.
Definition: PopulationManager.h:362
fp_slurry
Definition: Treatment.h:58
fiber_covering
Definition: Treatment.h:128
summer_sow
Definition: Treatment.h:50
Skylark_PreFledgeling::st_Maturing
void st_Maturing() override
Definition: skylarks_all.cpp:3457
spring_sow_with_ferti
Definition: Treatment.h:115
sleep_all_day
Definition: Treatment.h:33
strigling_sow
Definition: Treatment.h:107