[mareframe] Annotation of /trunk/gadget/lengthpredator.cc
Annotation of /trunk/gadget/lengthpredator.cc
Parent Directory
| Revision Log
Revision 1 -
(view)
(download)
1 : |
agomez |
1 |
#include "lengthpredator.h" |
2 : |
|
|
#include "errorhandler.h" |
3 : |
|
|
#include "gadget.h" |
4 : |
|
|
#include "global.h" |
5 : |
|
|
|
6 : |
|
|
LengthPredator::LengthPredator(const char* givenname, const IntVector& Areas,
|
7 : |
|
|
Keeper* const keeper, Formula multscaler) : PopPredator(givenname, Areas) {
|
8 : |
|
|
|
9 : |
|
|
keeper->addString("scale");
|
10 : |
|
|
multi = multscaler;
|
11 : |
|
|
multi.Inform(keeper);
|
12 : |
|
|
keeper->clearLast();
|
13 : |
|
|
}
|
14 : |
|
|
|
15 : |
|
|
void LengthPredator::Sum(const PopInfoVector& NumberInArea, int area) {
|
16 : |
|
|
prednumber[this->areaNum(area)].Sum(&NumberInArea, *CI);
|
17 : |
|
|
}
|
18 : |
|
|
|
19 : |
|
|
void LengthPredator::Reset(const TimeClass* const TimeInfo) {
|
20 : |
|
|
PopPredator::Reset(TimeInfo);
|
21 : |
|
|
if (multi < 0.0)
|
22 : |
|
|
handle.logMessage(LOGWARN, "Warning in lengthpredator - negative value for multiplicative");
|
23 : |
|
|
}
|
|