Gadget
Public Member Functions | List of all members
BaseClass Class Referenceabstract

This is the base class for any object that can be dynamically modelled within Gadget. More...

#include <base.h>

Inheritance diagram for BaseClass:
Inheritance graph
Collaboration diagram for BaseClass:
Collaboration graph

Public Member Functions

 BaseClass ()
 This is the default BaseClass constructor. More...
 
 BaseClass (const char *givenname)
 This is the BaseClass constructor for an object with a name. More...
 
 BaseClass (const char *givenname, const IntVector &Areas)
 This is the BaseClass constructor for an object with a name and an area. More...
 
virtual ~BaseClass ()
 This is the default BaseClass destructor. More...
 
virtual void calcNumbers (int area, const TimeClass *const TimeInfo)=0
 This function will update the model population for an area in the model. More...
 
virtual void calcEat (int area, const AreaClass *const Area, const TimeClass *const TimeInfo)=0
 This function will calculate the modelled consumption for an area in the model. More...
 
virtual void checkEat (int area, const TimeClass *const TimeInfo)=0
 This function will check the modelled consumption for an area in the model. More...
 
virtual void adjustEat (int area, const TimeClass *const TimeInfo)=0
 This function will adjust the modelled consumption for an area in the model. More...
 
virtual void reducePop (int area, const TimeClass *const TimeInfo)=0
 This function will reduce the model population for an area in the model. More...
 
virtual void Grow (int area, const AreaClass *const Area, const TimeClass *const TimeInfo)=0
 This function will calculate the growth of the model population for an area in the model. More...
 
virtual void updateAgePart1 (int area, const TimeClass *const TimeInfo)=0
 This function will calculate any transition of the model population for an area in the model. More...
 
virtual void updateAgePart2 (int area, const TimeClass *const TimeInfo)=0
 This function will calculate the age increase of the model population for an area in the model. More...
 
virtual void updateAgePart3 (int area, const TimeClass *const TimeInfo)=0
 This function will implement the transiton of the model population for an area in the model. More...
 
virtual void updatePopulationPart1 (int area, const TimeClass *const TimeInfo)=0
 This function will calculate the spawning of the model population for an area in the model. More...
 
virtual void updatePopulationPart2 (int area, const TimeClass *const TimeInfo)=0
 This function will calculate add the newly matured stock into the model population for an area in the model. More...
 
virtual void updatePopulationPart3 (int area, const TimeClass *const TimeInfo)=0
 This function will calculate add the new recruits into the model population for an area in the model. More...
 
virtual void updatePopulationPart4 (int area, const TimeClass *const TimeInfo)=0
 This function will calculate calculate the straying of the model population for an area in the model. More...
 
virtual void updatePopulationPart5 (int area, const TimeClass *const TimeInfo)=0
 This function will calculate add the strayed stock into the model population for an area in the model. More...
 
virtual void Migrate (const TimeClass *const TimeInfo)=0
 This function will implement the migration of the model population for the model. More...
 
virtual void Reset (const TimeClass *const TimeInfo)=0
 This function will reset the model population. More...
 
virtual void Print (ofstream &outfile) const =0
 This function will print the model population. More...
 
- Public Member Functions inherited from HasName
 HasName ()
 This is the default HasName constructor. More...
 
virtual ~HasName ()
 This is the default HasName destructor. More...
 
 HasName (const char *givenname)
 This is the HasName constructor for a specified name. More...
 
const char * getName () const
 This will return a null terminated text string containing the name of the object. More...
 
- Public Member Functions inherited from LivesOnAreas
 LivesOnAreas ()
 This is the default LivesOnAreas constructor. More...
 
virtual ~LivesOnAreas ()
 This is the default LivesOnAreas destructor. More...
 
 LivesOnAreas (const IntVector &Areas)
 This is the LivesOnAreas constructor for a specified vector of areas. More...
 
int isInArea (int area) const
 This function will check whether the object is defined on a specified area. More...
 
IntVectorgetAreas ()
 This function will return the internal areas that the object is defined on. More...
 
int areaNum (int area) const
 This function will return the area associated with an internal area. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LivesOnAreas
void storeAreas (const IntVector &Areas)
 This function will store the internal areas to be used. More...
 
- Protected Attributes inherited from LivesOnAreas
IntVector areas
 This is the IntVector of internal areas that the object is defined on. More...
 

Detailed Description

This is the base class for any object that can be dynamically modelled within Gadget.

Note
This will always be overridden by the derived classes (either Stock, Fleet or OtherFood)

Constructor & Destructor Documentation

◆ BaseClass() [1/3]

BaseClass::BaseClass ( )
inline

This is the default BaseClass constructor.

◆ BaseClass() [2/3]

BaseClass::BaseClass ( const char *  givenname)
inline

This is the BaseClass constructor for an object with a name.

Parameters
givennameis a text string containing the name of the object to be created

◆ BaseClass() [3/3]

BaseClass::BaseClass ( const char *  givenname,
const IntVector Areas 
)
inline

This is the BaseClass constructor for an object with a name and an area.

Parameters
givennameis a text string containing the name of the object to be created
Areasis the IntVector of internal areas to be used

◆ ~BaseClass()

virtual BaseClass::~BaseClass ( )
inlinevirtual

This is the default BaseClass destructor.

Member Function Documentation

◆ adjustEat()

virtual void BaseClass::adjustEat ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will adjust the modelled consumption for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ calcEat()

virtual void BaseClass::calcEat ( int  area,
const AreaClass *const  Area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate the modelled consumption for an area in the model.

Parameters
areais an integer to denote the internal area of interest
Areais the AreaClass for the current model
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ calcNumbers()

virtual void BaseClass::calcNumbers ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will update the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ checkEat()

virtual void BaseClass::checkEat ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will check the modelled consumption for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ Grow()

virtual void BaseClass::Grow ( int  area,
const AreaClass *const  Area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate the growth of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
Areais the AreaClass for the current model
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ Migrate()

virtual void BaseClass::Migrate ( const TimeClass *const  TimeInfo)
pure virtual

This function will implement the migration of the model population for the model.

Parameters
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ Print()

virtual void BaseClass::Print ( ofstream &  outfile) const
pure virtual

This function will print the model population.

Parameters
outfileis the ofstream that all the model information gets sent to

Implemented in Stock, OtherFood, and Fleet.

◆ reducePop()

virtual void BaseClass::reducePop ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will reduce the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ Reset()

virtual void BaseClass::Reset ( const TimeClass *const  TimeInfo)
pure virtual

This function will reset the model population.

Parameters
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ updateAgePart1()

virtual void BaseClass::updateAgePart1 ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate any transition of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ updateAgePart2()

virtual void BaseClass::updateAgePart2 ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate the age increase of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ updateAgePart3()

virtual void BaseClass::updateAgePart3 ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will implement the transiton of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ updatePopulationPart1()

virtual void BaseClass::updatePopulationPart1 ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate the spawning of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ updatePopulationPart2()

virtual void BaseClass::updatePopulationPart2 ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate add the newly matured stock into the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ updatePopulationPart3()

virtual void BaseClass::updatePopulationPart3 ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate add the new recruits into the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ updatePopulationPart4()

virtual void BaseClass::updatePopulationPart4 ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate calculate the straying of the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.

◆ updatePopulationPart5()

virtual void BaseClass::updatePopulationPart5 ( int  area,
const TimeClass *const  TimeInfo 
)
pure virtual

This function will calculate add the strayed stock into the model population for an area in the model.

Parameters
areais an integer to denote the internal area of interest
TimeInfois the TimeClass for the current model

Implemented in Stock, OtherFood, and Fleet.


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