ALMaSS Bembidion ODdox  1.1
The bembidion model description following ODdox protocol
Bembidion_Base Class Reference

The class describing the base class for beetle objects objects. More...

#include <bembidion_all.h>

Inheritance diagram for Bembidion_Base:
TAnimal TALMaSSObject Bembidion_Adult Bembidion_Egg_List Bembidion_Larvae Bembidion_Pupae

Public Member Functions

 Bembidion_Base (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM)
 Constructor. More...
 
void ReInit (int x, int y, Landscape *L, Bembidion_Population_Manager *BPM)
 ReInit for object pool. More...
 
virtual void BeginStep ()
 BeginStep - empty. More...
 
virtual void Step ()
 Step - empty. More...
 
virtual void EndStep ()
 EndStep - empty. More...
 
virtual void st_Die ()
 Common state Die. More...
 
void CopyMyself (int a_beetle)
 For experimental purposes. More...
 
void CopyMyselfB (int a_beetle)
 For experimental purposes. More...
 
- Public Member Functions inherited from TAnimal
unsigned SupplyFarmOwnerRef ()
 
AnimalPosition SupplyPosition ()
 
APoint SupplyPoint ()
 
int SupplyPolygonRef ()
 
int Supply_m_Location_x ()
 
int Supply_m_Location_y ()
 
virtual void KillThis ()
 
virtual void CopyMyself ()
 
void SetX (int a_x)
 
void SetY (int a_y)
 
 TAnimal (int x, int y, Landscape *L)
 
virtual void ReinitialiseObject (int x, int y, Landscape *L)
 Used to re-use an object - must be implemented in descendent classes. More...
 
virtual int WhatState ()
 
virtual void Dying ()
 
void CheckManagement (void)
 
void CheckManagementXY (int x, int y)
 
virtual bool OnFarmEvent (FarmToDo)
 
- Public Member Functions inherited from TALMaSSObject
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 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...
 

Public Attributes

TTypesOfBeetleState CurrentBState
 Current behavioural state. More...
 
Bembidion_Population_Managerm_OurPopulation
 Pointer to the population manager. More...
 

Additional Inherited Members

- Protected Member Functions inherited from TAnimal
void CorrectWrapRound ()
 Corrects wrap around co-ordinate problems. More...
 
- Protected Attributes inherited from TAnimal
int m_Location_x
 
int m_Location_y
 
Landscapem_OurLandscape
 
- 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...
 

Detailed Description

The class describing the base class for beetle objects objects.

Definition at line 141 of file bembidion_all.h.

Constructor & Destructor Documentation

◆ Bembidion_Base()

Bembidion_Base::Bembidion_Base ( int  x,
int  y,
Landscape L,
Bembidion_Population_Manager BPM 
)

Constructor.

Definition at line 205 of file Bembidion_all.cpp.

207  : TAnimal( x, y, L ) {
208  m_OurPopulation = BPM;
210 }

References CurrentBState, m_OurPopulation, and tobs_Initiation.

Member Function Documentation

◆ BeginStep()

virtual void Bembidion_Base::BeginStep ( void  )
inlinevirtual

BeginStep - empty.

Reimplemented from TAnimal.

Reimplemented in Bembidion_Adult, Bembidion_Pupae, Bembidion_Larvae, and Bembidion_Egg_List.

Definition at line 150 of file bembidion_all.h.

150 {}

◆ CopyMyself()

void Bembidion_Base::CopyMyself ( int  a_beetle)

For experimental purposes.

Used for experimental manipulation of the population. This method clones a beetle a_beetles times at the same location as the original.

Definition at line 240 of file Bembidion_all.cpp.

241 {
242  struct_Bembidion * BS;
243  BS = new struct_Bembidion;
244  BS->x = m_Location_x;
245  BS->y = m_Location_y;
246  BS->L = m_OurLandscape;
247  BS->BPM = m_OurPopulation;
248  m_OurPopulation->CreateObjects(a_beetle,this,NULL,BS,1);
249  delete BS;
250 }

References struct_Bembidion::BPM, Bembidion_Population_Manager::CreateObjects(), struct_Bembidion::L, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, m_OurPopulation, struct_Bembidion::x, and struct_Bembidion::y.

Referenced by Bembidion_Population_Manager::Catastrophe().

◆ CopyMyselfB()

void Bembidion_Base::CopyMyselfB ( int  a_beetle)

For experimental purposes.

Used for experimental manipulation of the population. This method clones a beetle a_beetles times within +/- 32m of the individuals location using wrap around.

Definition at line 258 of file Bembidion_all.cpp.

259 {
260  struct_Bembidion * BS;
261  for (int i=0; i<a_beetle; i++) {
262  BS = new struct_Bembidion;
263  int coord = ((m_Location_x + (random(64)-32))+m_OurPopulation->SimW) % m_OurPopulation->SimW ;
264  BS->x = coord;
265  coord = ((m_Location_y + (random(64)-32))+m_OurPopulation->SimH) % m_OurPopulation->SimH ;
266  BS->y = coord;
267  BS->L = m_OurLandscape;
268  BS->BPM = m_OurPopulation;
269  m_OurPopulation->CreateObjects(1,this,NULL,BS,1);
270  delete BS;
271  }
272 
273 }

References struct_Bembidion::BPM, Bembidion_Population_Manager::CreateObjects(), struct_Bembidion::L, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, m_OurPopulation, Population_Manager::SimH, Population_Manager::SimW, struct_Bembidion::x, and struct_Bembidion::y.

◆ EndStep()

virtual void Bembidion_Base::EndStep ( void  )
inlinevirtual

EndStep - empty.

Reimplemented from TAnimal.

Reimplemented in Bembidion_Adult.

Definition at line 154 of file bembidion_all.h.

154 {}

◆ ReInit()

void Bembidion_Base::ReInit ( int  x,
int  y,
Landscape L,
Bembidion_Population_Manager BPM 
)

ReInit for object pool.

Definition at line 213 of file Bembidion_all.cpp.

213  {
214  ReinitialiseObject( x, y, L );
215  m_OurPopulation = BPM;
217 }

References CurrentBState, m_OurPopulation, TALMaSSObject::ReinitialiseObject(), and tobs_Initiation.

Referenced by Bembidion_Larvae::ReInit(), Bembidion_Pupae::ReInit(), and Bembidion_Adult::ReInit().

◆ st_Die()

void Bembidion_Base::st_Die ( )
virtual

◆ Step()

virtual void Bembidion_Base::Step ( void  )
inlinevirtual

Step - empty.

Reimplemented from TAnimal.

Reimplemented in Bembidion_Adult, Bembidion_Pupae, Bembidion_Larvae, and Bembidion_Egg_List.

Definition at line 152 of file bembidion_all.h.

152 {}

Member Data Documentation

◆ CurrentBState

◆ m_OurPopulation


The documentation for this class was generated from the following files:
struct_Bembidion::L
Landscape * L
Definition: bembidion_all.h:119
Bembidion_Population_Manager::CreateObjects
void CreateObjects(int ob_type, TAnimal *pvo, void *null, struct_Bembidion *data, int number)
Method to add beetles to the population.
Definition: Bembidion_all.cpp:2942
TAnimal::m_OurLandscape
Landscape * m_OurLandscape
Definition: populationmanager.h:229
tobs_Destroy
Definition: bembidion_all.h:55
struct_Bembidion::y
int y
Definition: bembidion_all.h:118
Population_Manager::SimW
int SimW
Definition: populationmanager.h:511
TAnimal::TAnimal
TAnimal(int x, int y, Landscape *L)
Definition: PopulationManager.cpp:1367
TAnimal::m_Location_y
int m_Location_y
Definition: populationmanager.h:228
struct_Bembidion::x
int x
Definition: bembidion_all.h:117
TALMaSSObject::m_StepDone
bool m_StepDone
Indicates whether the iterative step code is done for this timestep.
Definition: populationmanager.h:118
struct_Bembidion::BPM
Bembidion_Population_Manager * BPM
Definition: bembidion_all.h:120
struct_Bembidion
A data class for Bembidion data.
Definition: bembidion_all.h:113
Bembidion_Base::CurrentBState
TTypesOfBeetleState CurrentBState
Current behavioural state.
Definition: bembidion_all.h:159
Population_Manager::SimH
int SimH
Definition: populationmanager.h:511
Bembidion_Base::m_OurPopulation
Bembidion_Population_Manager * m_OurPopulation
Pointer to the population manager.
Definition: bembidion_all.h:161
TALMaSSObject::ReinitialiseObject
virtual void ReinitialiseObject()
Used to re-use an object - must be implemented in descendent classes.
Definition: populationmanager.h:143
TALMaSSObject::m_CurrentStateNo
int m_CurrentStateNo
The basic state number for all objects - '-1' indicates death.
Definition: populationmanager.h:116
TAnimal::m_Location_x
int m_Location_x
Definition: populationmanager.h:225
tobs_Initiation
Definition: bembidion_all.h:35
Population_Manager::LamdaDeath
void LamdaDeath(int x, int y)
Definition: populationmanager.h:599