ALMaSS Rodenticide ODdox  1.1
The rodenticide model description following ODdox protocol
TALMaSSObject Class Reference

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

#include <PopulationManager.h>

Public Member Functions

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

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

1379  {
1380 #ifdef __CJTDebug_5
1381  AmAlive = 0xDEADC0DE;
1382 #endif
1383  m_StepDone = false;
1384  m_CurrentStateNo = 0;
1385 }

◆ ~TALMaSSObject()

TALMaSSObject::~TALMaSSObject ( )
virtual

The destructor for TALMaSSObject.

TALMaSSObject Destructor

1393  {
1394 #ifdef __CJTDebug_5
1395  AmAlive = 0;
1396 #endif
1397 }

Member Function Documentation

◆ BeginStep()

virtual void TALMaSSObject::BeginStep ( void  )
inlinevirtual

BeingStep behaviour - must be implemented in descendent classes.

Reimplemented in TAnimal.

137 {}

◆ EndStep()

virtual void TALMaSSObject::EndStep ( void  )
inlinevirtual

EndStep behaviour - must be implemented in descendent classes.

Reimplemented in TAnimal.

141 {}

◆ GetCurrentStateNo()

int TALMaSSObject::GetCurrentStateNo ( )
inline

Returns the current state number.

121  {
122  return m_CurrentStateNo;
123  }

References m_CurrentStateNo.

Referenced by CompareStateR::operator()(), CompareStateDead::operator()(), and CompareStateAlive::operator()().

◆ GetStepDone()

bool TALMaSSObject::GetStepDone ( )
inline

Returns the step done indicator flag.

129  {
130  return m_StepDone;
131  }

References m_StepDone.

◆ OnArrayBoundsError()

void TALMaSSObject::OnArrayBoundsError ( )

Used for debugging only, tests basic object properties.

1427  {
1428  exit( 1 );
1429 }

◆ ReinitialiseObject()

virtual void TALMaSSObject::ReinitialiseObject ( )
inlinevirtual

Used to re-use an object - must be implemented in descendent classes.

143  {
144  m_StepDone = false;
145  m_CurrentStateNo = 0;
146  }

References m_CurrentStateNo, and m_StepDone.

Referenced by TAnimal::ReinitialiseObject().

◆ SetCurrentStateNo()

void TALMaSSObject::SetCurrentStateNo ( int  a_num)
inline

Sets the current state number.

125  {
126  m_CurrentStateNo = a_num;
127  }

References m_CurrentStateNo.

◆ SetStepDone()

void TALMaSSObject::SetStepDone ( bool  a_bool)
inline

Sets the step done indicator flag.

133  {
134  m_StepDone = a_bool;
135  }

References m_StepDone.

◆ Step()

virtual void TALMaSSObject::Step ( void  )
inlinevirtual

Step behaviour - must be implemented in descendent classes.

Reimplemented in TAnimal.

139 {}

Member Data Documentation

◆ m_CurrentStateNo

int TALMaSSObject::m_CurrentStateNo
protected

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

Referenced by GetCurrentStateNo(), TAnimal::KillThis(), ReinitialiseObject(), and SetCurrentStateNo().

◆ m_StepDone

bool TALMaSSObject::m_StepDone
protected

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

Referenced by GetStepDone(), TAnimal::KillThis(), ReinitialiseObject(), and SetStepDone().


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:118
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: PopulationManager.h:116