Gadget
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
StockStdPrinter Class Reference

This is the class used to print 'standard' information about a stock. More...

#include <stockstdprinter.h>

Inheritance diagram for StockStdPrinter:
Inheritance graph
Collaboration diagram for StockStdPrinter:
Collaboration graph

Public Member Functions

 StockStdPrinter (CommentStream &infile, const TimeClass *const TimeInfo)
 This is the default StockStdPrinter constructor. More...
 
virtual ~StockStdPrinter ()
 This is the default StockStdPrinter 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 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 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 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

char * stockname
 This is the name of the stock. More...
 
LengthGroupDivisionLgrpDiv
 This is the LengthGroupDivision of the stock. More...
 
IntVector outerareas
 This is the IntVector used to store aggregated area information. More...
 
int isaprey
 This is the flag to denote whether the stock is a prey or not. More...
 
int minage
 This is the minimum age of the stock. More...
 
double scale
 This is the scaling factor used to scale the size of the stock. More...
 
StockAggregatorsaggregator
 This is the StockAggregator used to collect information about the stock. More...
 
StockPreyAggregatorpaggregator
 This is the StockPreyAggregator used to collect information about the stock prey. More...
 
PopStatistics ps
 This is the PopStatistics used to calculate the statistics of the population. More...
 
const AgeBandMatrixPtrVectorsalptr
 This is the AgeBandMatrixPtrVector used to temporarily store the information returned from the stock aggregatation function. More...
 
const AgeBandMatrixPtrVectorpalptr
 This is the AgeBandMatrixPtrVector used to temporarily store the information returned from the prey 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 'standard' information about a stock.

Constructor & Destructor Documentation

◆ StockStdPrinter()

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

This is the default StockStdPrinter constructor.

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

◆ ~StockStdPrinter()

StockStdPrinter::~StockStdPrinter ( )
virtual

This is the default StockStdPrinter destructor.

Member Function Documentation

◆ Print()

void StockStdPrinter::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.

◆ setStock()

void StockStdPrinter::setStock ( StockPtrVector stockvec,
const AreaClass *const  Area 
)
virtual

This will select the stocks required for the printer class to print the requested information.

Parameters
stockvecis the StockPtrVector of all the available stocks
Areais the AreaClass for the current model

Reimplemented from Printer.

Member Data Documentation

◆ isaprey

int StockStdPrinter::isaprey
protected

This is the flag to denote whether the stock is a prey or not.

◆ LgrpDiv

LengthGroupDivision* StockStdPrinter::LgrpDiv
protected

This is the LengthGroupDivision of the stock.

◆ minage

int StockStdPrinter::minage
protected

This is the minimum age of the stock.

◆ outerareas

IntVector StockStdPrinter::outerareas
protected

This is the IntVector used to store aggregated area information.

◆ paggregator

StockPreyAggregator* StockStdPrinter::paggregator
protected

This is the StockPreyAggregator used to collect information about the stock prey.

◆ palptr

const AgeBandMatrixPtrVector* StockStdPrinter::palptr
protected

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

◆ ps

PopStatistics StockStdPrinter::ps
protected

This is the PopStatistics used to calculate the statistics of the population.

◆ saggregator

StockAggregator* StockStdPrinter::saggregator
protected

This is the StockAggregator used to collect information about the stock.

◆ salptr

const AgeBandMatrixPtrVector* StockStdPrinter::salptr
protected

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

◆ scale

double StockStdPrinter::scale
protected

This is the scaling factor used to scale the size of the stock.

◆ stockname

char* StockStdPrinter::stockname
protected

This is the name of the stock.


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