1 : |
agomez |
1 |
#ifndef predatorprinter_h
|
2 : |
|
|
#define predatorprinter_h
|
3 : |
|
|
|
4 : |
|
|
#include "printer.h" |
5 : |
|
|
#include "predatoraggregator.h" |
6 : |
|
|
#include "gadget.h" |
7 : |
|
|
|
8 : |
|
|
/**
|
9 : |
|
|
* \class PredatorPrinter
|
10 : |
|
|
* \brief This is the class used to print the predation information for one or more predators consuming one or more preys
|
11 : |
|
|
*/
|
12 : |
|
|
class PredatorPrinter : public Printer {
|
13 : |
|
|
public:
|
14 : |
|
|
/**
|
15 : |
|
|
* \brief This is the default PredatorPrinter constructor
|
16 : |
|
|
* \param infile is the CommentStream to read the printer parameters from
|
17 : |
|
|
* \param TimeInfo is the TimeClass for the current model
|
18 : |
|
|
*/
|
19 : |
|
|
PredatorPrinter(CommentStream& infile, const TimeClass* const TimeInfo);
|
20 : |
|
|
/**
|
21 : |
|
|
* \brief This is the default PredatorPrinter destructor
|
22 : |
|
|
*/
|
23 : |
|
|
virtual ~PredatorPrinter();
|
24 : |
|
|
/**
|
25 : |
|
|
* \brief This will select the predators and preys required for the printer class to print the requested information
|
26 : |
|
|
* \param predatorvec is the PredatorPtrVector of all the available predators
|
27 : |
|
|
* \param preyvec is the PreyPtrVector of all the available preys
|
28 : |
|
|
* \param Area is the AreaClass for the current model
|
29 : |
|
|
*/
|
30 : |
|
|
virtual void setPredAndPrey(PredatorPtrVector& predatorvec, PreyPtrVector& preyvec, const AreaClass* const Area);
|
31 : |
|
|
/**
|
32 : |
|
|
* \brief This will print the requested information for the printer class to the ofstream specified
|
33 : |
|
|
* \param TimeInfo is the TimeClass for the current model
|
34 : |
|
|
* \param printtime is the flag to denote when the printing is taking place
|
35 : |
|
|
*/
|
36 : |
|
|
virtual void Print(const TimeClass* const TimeInfo, int printtime);
|
37 : |
|
|
protected:
|
38 : |
|
|
/**
|
39 : |
|
|
* \brief This is the IntMatrix used to store aggregated area information
|
40 : |
|
|
*/
|
41 : |
|
|
IntMatrix areas;
|
42 : |
|
|
/**
|
43 : |
|
|
* \brief This is the CharPtrVector of the names of the aggregated areas to print
|
44 : |
|
|
*/
|
45 : |
|
|
CharPtrVector areaindex;
|
46 : |
|
|
/**
|
47 : |
|
|
* \brief This is the CharPtrVector of the names of the predator lengths to print
|
48 : |
|
|
*/
|
49 : |
|
|
CharPtrVector predlenindex;
|
50 : |
|
|
/**
|
51 : |
|
|
* \brief This is the CharPtrVector of the names of the prey lengths to print
|
52 : |
|
|
*/
|
53 : |
|
|
CharPtrVector preylenindex;
|
54 : |
|
|
/**
|
55 : |
|
|
* \brief This is the CharPtrVector of the names of the predator names to print
|
56 : |
|
|
*/
|
57 : |
|
|
CharPtrVector predatornames;
|
58 : |
|
|
/**
|
59 : |
|
|
* \brief This is the CharPtrVector of the names of the prey names to print
|
60 : |
|
|
*/
|
61 : |
|
|
CharPtrVector preynames;
|
62 : |
|
|
/**
|
63 : |
|
|
* \brief This is the LengthGroupDivision of the predator
|
64 : |
|
|
*/
|
65 : |
|
|
LengthGroupDivision* predLgrpDiv;
|
66 : |
|
|
/**
|
67 : |
|
|
* \brief This is the LengthGroupDivision of the prey
|
68 : |
|
|
*/
|
69 : |
|
|
LengthGroupDivision* preyLgrpDiv;
|
70 : |
|
|
/**
|
71 : |
|
|
* \brief This is the PredatorAggregator used to collect information about the predation
|
72 : |
|
|
*/
|
73 : |
|
|
PredatorAggregator* aggregator;
|
74 : |
|
|
/**
|
75 : |
|
|
* \brief This is the flag used to denote whether the biomass consumed or the numbers consumed is printed to the outfile (default is to print biomass)
|
76 : |
|
|
*/
|
77 : |
|
|
int biomass;
|
78 : |
|
|
/**
|
79 : |
|
|
* \brief This is the DoubleMatrix used to temporarily store the information returned from the aggregatation function
|
80 : |
|
|
*/
|
81 : |
|
|
const DoubleMatrix* dptr;
|
82 : |
|
|
};
|
83 : |
|
|
|
84 : |
|
|
#endif
|