ALMaSS Rabbit ODdox  1.1
The rabbit model description following ODdox protocol
TALMaSSObject Class Reference

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

#include <populationmanager.h>

Inheritance diagram for TALMaSSObject:
TAnimal Rabbit_Base Rabbit_Warren Rabbit_Adult Rabbit_Young Rabbit_Female Rabbit_Male Rabbit_Juvenile

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.

Definition at line 113 of file populationmanager.h.

Constructor & Destructor Documentation

◆ TALMaSSObject()

TALMaSSObject::TALMaSSObject ( )

The constructor for TALMaSSObject.

TALMaSSObject Constructor

Definition at line 1379 of file PopulationManager.cpp.

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

Definition at line 1393 of file PopulationManager.cpp.

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 Rabbit_Base, TAnimal, and Rabbit_Warren.

Definition at line 137 of file populationmanager.h.

137 {}

◆ EndStep()

virtual void TALMaSSObject::EndStep ( void  )
inlinevirtual

EndStep behaviour - must be implemented in descendent classes.

Reimplemented in Rabbit_Adult, Rabbit_Juvenile, Rabbit_Young, Rabbit_Base, and TAnimal.

Definition at line 141 of file populationmanager.h.

141 {}

◆ GetCurrentStateNo()

int TALMaSSObject::GetCurrentStateNo ( )
inline

Returns the current state number.

Definition at line 121 of file populationmanager.h.

121  {
122  return m_CurrentStateNo;
123  }

References m_CurrentStateNo.

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

◆ GetStepDone()

bool TALMaSSObject::GetStepDone ( )
inline

Returns the step done indicator flag.

Definition at line 129 of file populationmanager.h.

129  {
130  return m_StepDone;
131  }

References m_StepDone.

◆ OnArrayBoundsError()

void TALMaSSObject::OnArrayBoundsError ( )

Used for debugging only, tests basic object properties.

Definition at line 1427 of file PopulationManager.cpp.

1427  {
1428  exit( 1 );
1429 }

◆ ReinitialiseObject()

virtual void TALMaSSObject::ReinitialiseObject ( )
inlinevirtual

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

Definition at line 143 of file populationmanager.h.

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.

Definition at line 125 of file populationmanager.h.

125  {
126  m_CurrentStateNo = a_num;
127  }

References m_CurrentStateNo.

◆ SetStepDone()

void TALMaSSObject::SetStepDone ( bool  a_bool)
inline

Sets the step done indicator flag.

Definition at line 133 of file populationmanager.h.

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 Rabbit_Female, Rabbit_Male, Rabbit_Juvenile, Rabbit_Young, Rabbit_Base, TAnimal, and Rabbit_Warren.

Definition at line 139 of file populationmanager.h.

139 {}

Member Data Documentation

◆ m_CurrentStateNo

◆ m_StepDone


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