ALMaSS Rodenticide Model ODdox  1.0
TALMaSSObject Class Reference

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

#include <PopulationManager.h>

Public Member Functions

virtual void BeginStep (void)
 BeingStep behaviour - must be implemented in descendent classes. More...
 
virtual void EndStep (void)
 EndStep behaviour - must be implemented in descendent classes. More...
 
int GetCurrentStateNo ()
 Returns the current state number. More...
 
bool GetStepDone ()
 Returns the step done indicator flag. More...
 
void OnArrayBoundsError ()
 Used for debugging only, tests basic object properties. More...
 
virtual void ReinitialiseObject ()
 Used to re-use an object - must be implemented in descendent classes. More...
 
void SetCurrentStateNo (int a_num)
 Sets the current state number. More...
 
void SetStepDone (bool a_bool)
 Sets the step done indicator flag. More...
 
virtual void Step (void)
 Step behaviour - must be implemented in descendent classes. More...
 
 TALMaSSObject ()
 The constructor for TALMaSSObject. More...
 
virtual ~TALMaSSObject ()
 The destructor for TALMaSSObject. 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 ( )

The constructor for TALMaSSObject.

TALMaSSObject Constructor

1448  {
1449 #ifdef __CJTDebug_5
1450  AmAlive = 0xDEADC0DE;
1451 #endif
1452  m_StepDone = false;
1453  m_CurrentStateNo = 0;
1454 }
int m_CurrentStateNo
The basic state number for all objects - &#39;-1&#39; indicates death.
Definition: PopulationManager.h:112
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:114
TALMaSSObject::~TALMaSSObject ( )
virtual

The destructor for TALMaSSObject.

TALMaSSObject Destructor

1462  {
1463 #ifdef __CJTDebug_5
1464  AmAlive = 0;
1465 #endif
1466 }

Member Function Documentation

virtual void TALMaSSObject::BeginStep ( void  )
inlinevirtual

BeingStep behaviour - must be implemented in descendent classes.

Reimplemented in TAnimal.

133 {}
virtual void TALMaSSObject::EndStep ( void  )
inlinevirtual

EndStep behaviour - must be implemented in descendent classes.

Reimplemented in TAnimal.

137 {}
int TALMaSSObject::GetCurrentStateNo ( )
inline

Returns the current state number.

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

117  {
118  return m_CurrentStateNo;
119  }
int m_CurrentStateNo
The basic state number for all objects - &#39;-1&#39; indicates death.
Definition: PopulationManager.h:112
bool TALMaSSObject::GetStepDone ( )
inline

Returns the step done indicator flag.

125  {
126  return m_StepDone;
127  }
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:114
void TALMaSSObject::OnArrayBoundsError ( )

Used for debugging only, tests basic object properties.

1496  {
1497  exit( 1 );
1498 }
virtual void TALMaSSObject::ReinitialiseObject ( )
inlinevirtual

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

Referenced by TAnimal::ReinitialiseObject().

139  {
140  m_StepDone = false;
141  m_CurrentStateNo = 0;
142  }
int m_CurrentStateNo
The basic state number for all objects - &#39;-1&#39; indicates death.
Definition: PopulationManager.h:112
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:114
void TALMaSSObject::SetCurrentStateNo ( int  a_num)
inline

Sets the current state number.

121  {
122  m_CurrentStateNo = a_num;
123  }
int m_CurrentStateNo
The basic state number for all objects - &#39;-1&#39; indicates death.
Definition: PopulationManager.h:112
void TALMaSSObject::SetStepDone ( bool  a_bool)
inline

Sets the step done indicator flag.

129  {
130  m_StepDone = a_bool;
131  }
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: PopulationManager.h:114
virtual void TALMaSSObject::Step ( void  )
inlinevirtual

Step behaviour - must be implemented in descendent classes.

Reimplemented in TAnimal.

135 {}

Member Data Documentation

int TALMaSSObject::m_CurrentStateNo
protected

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

bool TALMaSSObject::m_StepDone
protected

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


The documentation for this class was generated from the following files: