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

The base class of all ALMaSS objects requiring Step code. More...

#include <PopulationManager.h>

Inheritance diagram for TALMaSSObject:
TAnimal Beetle_Base Osmia_Base Osmia_Nest Skylark_Base Spider_Base SubPopulation THare TPredator Vole_Base

Public Member Functions

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

Static Public Member Functions

static void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 

Protected Attributes

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

Detailed Description

The base class of all ALMaSS objects requiring Step code.

Constructor & Destructor Documentation

◆ TALMaSSObject()

TALMaSSObject::TALMaSSObject ( )

The constructor for TALMaSSObject.

TALMaSSObject Constructor

1578  {
1579 #ifdef __CJTDebug_5
1580  AmAlive = 0xDEADC0DE;
1581 #endif
1582  m_StepDone = false;
1583  m_CurrentStateNo = 0;
1584 }

References m_CurrentStateNo, and m_StepDone.

◆ ~TALMaSSObject()

virtual TALMaSSObject::~TALMaSSObject ( )
virtualdefault

The destructor for TALMaSSObject.

Member Function Documentation

◆ BeginStep()

◆ EndStep()

virtual void TALMaSSObject::EndStep ( void  )
inlinevirtual

◆ GetCurrentStateNo()

◆ GetStepDone()

bool TALMaSSObject::GetStepDone ( ) const
inline

Returns the step done indicator flag.

141 { return m_StepDone; }

References m_StepDone.

Referenced by TPredator_Population_Manager::StepFinished().

◆ OnArrayBoundsError()

void TALMaSSObject::OnArrayBoundsError ( )
static

◆ ReinitialiseObjectBase()

void TALMaSSObject::ReinitialiseObjectBase ( )
inline

Used to initialise an object.

154  {
155  m_StepDone = false;
156  m_CurrentStateNo = 0;
157  }

References m_CurrentStateNo, and m_StepDone.

Referenced by TAnimal::ReinitialiseObject().

◆ SetCurrentStateNo()

void TALMaSSObject::SetCurrentStateNo ( int  a_num)
inline

Sets the current state number.

139 { m_CurrentStateNo = a_num; }

References m_CurrentStateNo.

◆ SetStepDone()

void TALMaSSObject::SetStepDone ( bool  a_bool)
inline

Sets the step done indicator flag.

143 { m_StepDone = a_bool; }

References m_StepDone.

Referenced by TPredator_Population_Manager::Run().

◆ Step()

Member Data Documentation

◆ m_CurrentStateNo

int TALMaSSObject::m_CurrentStateNo
protected

The basic state number for all objects - '-1' indicates death.

Referenced by Spider_Juvenile::BeginStep(), Spider_Female::BeginStep(), Skylark_Nestling::BeginStep(), Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Skylark_Clutch::EndStep(), Skylark_Nestling::EndStep(), Skylark_PreFledgeling::EndStep(), GetCurrentStateNo(), Vole_Base::Init(), Beetle_Base::KillAndRemoveFromMap(), TAnimal::KillThis(), Hare_Juvenile::ON_Dead(), Hare_Male::ON_Dead(), Hare_Female::ON_Dead(), Skylark_Nestling::OnDeserted(), Skylark_Clutch::OnMumGone(), Skylark_Nestling::OnYouHaveBeenEaten(), Skylark_Base::ReInit(), Hare_Infant::ReInit(), Hare_Young::ReInit(), Hare_Juvenile::ReInit(), Hare_Male::ReInit(), Hare_Female::ReInit(), ReinitialiseObjectBase(), SetCurrentStateNo(), Skylark_Base::Skylark_Base(), Vole_JuvenileMale::st_BecomeSubAdult(), Vole_JuvenileFemale::st_BecomeSubAdult(), Spider_Egg::st_Die(), Vole_Base::st_Dying(), THare::st_Dying(), Skylark_Clutch::st_Dying(), Skylark_Nestling::st_Dying(), Skylark_PreFledgeling::st_Dying(), Skylark_Female::st_Dying(), Skylark_Male::st_Dying(), Ladybird_Pupae::St_Emerge(), Beetle_Pupae::St_Emerge(), Spider_Egg::st_Hatch(), Beetle_Larvae::St_NextStage(), Hare_Infant::st_NextStage(), Hare_Young::st_NextStage(), Hare_Juvenile::st_NextStage(), Beetle_Base::StDie(), Weasel::Step(), Owl::Step(), Spider_Egg::Step(), Beetle_Egg_List::Step(), Osmia_Egg::Step(), Spider_Juvenile::Step(), Osmia_Larva::Step(), Osmia_Prepupa::Step(), Vole_JuvenileMale::Step(), Osmia_Pupa::Step(), Spider_Female::Step(), Osmia_InCocoon::Step(), Vole_Male::Step(), Beetle_Larvae::Step(), Osmia_Female::Step(), Beetle_Pupae::Step(), Beetle_Adult::Step(), Hare_Infant::Step(), Hare_Young::Step(), Hare_Juvenile::Step(), Hare_Male::Step(), Hare_Female::Step(), and TALMaSSObject().

◆ m_StepDone

bool TALMaSSObject::m_StepDone
protected

Indicates whether the iterative step code is done for this timestep.

Referenced by Spider_Juvenile::BeginStep(), Vole_JuvenileMale::BeginStep(), Spider_Female::BeginStep(), Vole_JuvenileFemale::BeginStep(), Skylark_Female::BeginStep(), Skylark_Male::BeginStep(), Hare_Infant::BeginStep(), Hare_Young::BeginStep(), Hare_Juvenile::BeginStep(), Hare_Male::BeginStep(), Hare_Female::BeginStep(), Skylark_Clutch::EndStep(), Skylark_Nestling::EndStep(), Skylark_PreFledgeling::EndStep(), Hare_Male::GeneralOrganoPhosphate(), Hare_Female::GeneralOrganoPhosphate(), GetStepDone(), Beetle_Base::KillAndRemoveFromMap(), TAnimal::KillThis(), Hare_Juvenile::ON_Dead(), Hare_Male::ON_Dead(), Hare_Female::ON_Dead(), ReinitialiseObjectBase(), SetStepDone(), Spider_Female::st_Balloon(), Vole_JuvenileMale::st_BecomeSubAdult(), Vole_JuvenileFemale::st_BecomeSubAdult(), Spider_Egg::st_Develop(), THare::st_Dying(), Hare_Young::st_NextStage(), Spider_Juvenile::st_Walk(), Spider_Female::st_Walk(), Beetle_Base::StDie(), Weasel::Step(), Owl::Step(), Spider_Egg::Step(), Beetle_Egg_List::Step(), Osmia_Egg::Step(), Spider_Juvenile::Step(), Osmia_Larva::Step(), Osmia_Prepupa::Step(), Vole_JuvenileMale::Step(), Osmia_Pupa::Step(), Spider_Female::Step(), Osmia_InCocoon::Step(), Vole_Male::Step(), Vole_JuvenileFemale::Step(), Beetle_Larvae::Step(), Skylark_Clutch::Step(), Vole_Female::Step(), Skylark_Nestling::Step(), Skylark_PreFledgeling::Step(), Osmia_Female::Step(), Beetle_Pupae::Step(), Skylark_Female::Step(), Beetle_Adult::Step(), Skylark_Male::Step(), Hare_Infant::Step(), Hare_Young::Step(), Hare_Juvenile::Step(), Hare_Male::Step(), Hare_Female::Step(), and TALMaSSObject().


The documentation for this class was generated from the following files:
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:133
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:131