Gadget
Public Member Functions | Protected Attributes | List of all members
PredatorPreyPrinter Class Reference

This is the class used to print the predation information for one or more predators consuming one or more preys. More...

#include <predatorpreyprinter.h>

Inheritance diagram for PredatorPreyPrinter:
Inheritance graph
Collaboration diagram for PredatorPreyPrinter:
Collaboration graph

Public Member Functions

 PredatorPreyPrinter (CommentStream &infile, const TimeClass *const TimeInfo)
 This is the default PredatorPreyPrinter constructor. More...
 
virtual ~PredatorPreyPrinter ()
 This is the default PredatorPreyPrinter destructor. More...
 
virtual void setPredAndPrey (PredatorPtrVector &predatorvec, PreyPtrVector &preyvec, const AreaClass *const Area)
 This will select the predators and preys required for the printer class to print the requested information. More...
 
virtual void Print (const TimeClass *const TimeInfo, int printtime)
 This will print the requested information for the printer class to the ofstream specified. More...
 
- Public Member Functions inherited from Printer
 Printer (PrinterType ptype)
 This is the default Printer constructor. More...
 
virtual ~Printer ()
 This is the default Printer destructor. More...
 
virtual void setStock (StockPtrVector &stockvec, const AreaClass *const Area)
 This will select the stocks required for the printer class to print the requested information. More...
 
virtual void setPrey (PreyPtrVector &preyvec, const AreaClass *const Area)
 This will select the preys required for the printer class to print the requested information. More...
 
virtual void setPredator (PredatorPtrVector &predatorvec, const AreaClass *const Area)
 This will select the predators required for the printer class to print the requested information. More...
 
virtual void setLikelihood (LikelihoodPtrVector &likevec)
 This will select the likelihood components required for the printer class to print the requested information. More...
 
const char * getFileName () const
 This will return the name of the output file. More...
 
PrinterType getType () const
 This will return the type of printer class. More...
 

Protected Attributes

CharPtrVector predatornames
 This is the CharPtrVector of the names of the predators to print. More...
 
CharPtrVector preynames
 This is the CharPtrVector of the names of the preys to print. More...
 
IntMatrix areas
 This is the IntMatrix used to store aggregated area information. More...
 
IntMatrix ages
 This is the IntMatrix used to store aggregated age information. More...
 
LengthGroupDivisionLgrpDiv
 This is the LengthGroupDivision used to store aggregated length information. More...
 
CharPtrVector areaindex
 This is the CharPtrVector of the names of the aggregated areas to print. More...
 
CharPtrVector ageindex
 This is the CharPtrVector of the names of the aggregated ages to print. More...
 
CharPtrVector lenindex
 This is the CharPtrVector of the names of the lengths to print. More...
 
PredatorPreyAggregatoraggregator
 This is the PredatorPreyAggregator used to collect information about the predation. More...
 
const AgeBandMatrixPtrVectoralptr
 This is the AgeBandMatrixPtrVector used to temporarily store the population information returned from the aggregatation function. More...
 
const DoubleMatrixdptr
 This is the DoubleMatrix used to temporarily store the mortality information returned from the aggregatation function. More...
 
- Protected Attributes inherited from Printer
ActionAtTimes AAT
 This ActionAtTimes stores information about when the printer output is required in the model. More...
 
char * filename
 This is the name of the output file that all the model information will get sent to. More...
 
ofstream outfile
 This ofstream is the file that all the model information gets sent to. More...
 
int printtimeid
 This is the flag used to denote whether the printing takes place at the start or the end of the timestep. More...
 
int precision
 This is precision which can be used to override the default values when printing the information to the output file. More...
 
int width
 This is width used when printing the information to the output file. More...
 

Detailed Description

This is the class used to print the predation information for one or more predators consuming one or more preys.

Constructor & Destructor Documentation

◆ PredatorPreyPrinter()

PredatorPreyPrinter::PredatorPreyPrinter ( CommentStream infile,
const TimeClass *const  TimeInfo 
)

This is the default PredatorPreyPrinter constructor.

Parameters
infileis the CommentStream to read the printer parameters from
TimeInfois the TimeClass for the current model

◆ ~PredatorPreyPrinter()

PredatorPreyPrinter::~PredatorPreyPrinter ( )
virtual

This is the default PredatorPreyPrinter destructor.

Member Function Documentation

◆ Print()

void PredatorPreyPrinter::Print ( const TimeClass *const  TimeInfo,
int  printtime 
)
virtual

This will print the requested information for the printer class to the ofstream specified.

Parameters
TimeInfois the TimeClass for the current model
printtimeis the flag to denote when the printing is taking place

Implements Printer.

◆ setPredAndPrey()

void PredatorPreyPrinter::setPredAndPrey ( PredatorPtrVector predatorvec,
PreyPtrVector preyvec,
const AreaClass *const  Area 
)
virtual

This will select the predators and preys required for the printer class to print the requested information.

Parameters
predatorvecis the PredatorPtrVector of all the available predators
preyvecis the PreyPtrVector of all the available preys
Areais the AreaClass for the current model

Reimplemented from Printer.

Member Data Documentation

◆ ageindex

CharPtrVector PredatorPreyPrinter::ageindex
protected

This is the CharPtrVector of the names of the aggregated ages to print.

◆ ages

IntMatrix PredatorPreyPrinter::ages
protected

This is the IntMatrix used to store aggregated age information.

◆ aggregator

PredatorPreyAggregator* PredatorPreyPrinter::aggregator
protected

This is the PredatorPreyAggregator used to collect information about the predation.

◆ alptr

const AgeBandMatrixPtrVector* PredatorPreyPrinter::alptr
protected

This is the AgeBandMatrixPtrVector used to temporarily store the population information returned from the aggregatation function.

◆ areaindex

CharPtrVector PredatorPreyPrinter::areaindex
protected

This is the CharPtrVector of the names of the aggregated areas to print.

◆ areas

IntMatrix PredatorPreyPrinter::areas
protected

This is the IntMatrix used to store aggregated area information.

◆ dptr

const DoubleMatrix* PredatorPreyPrinter::dptr
protected

This is the DoubleMatrix used to temporarily store the mortality information returned from the aggregatation function.

◆ lenindex

CharPtrVector PredatorPreyPrinter::lenindex
protected

This is the CharPtrVector of the names of the lengths to print.

◆ LgrpDiv

LengthGroupDivision* PredatorPreyPrinter::LgrpDiv
protected

This is the LengthGroupDivision used to store aggregated length information.

◆ predatornames

CharPtrVector PredatorPreyPrinter::predatornames
protected

This is the CharPtrVector of the names of the predators to print.

◆ preynames

CharPtrVector PredatorPreyPrinter::preynames
protected

This is the CharPtrVector of the names of the preys to print.


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