+ eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached
This commit is contained in:
parent
52d4107bc4
commit
f98e138562
1 changed files with 5 additions and 5 deletions
|
|
@ -34,18 +34,18 @@ public :
|
||||||
|
|
||||||
using eoEvalFuncCounter< EOT >::value;
|
using eoEvalFuncCounter< EOT >::value;
|
||||||
|
|
||||||
virtual void operator()(EOT& _eo)
|
virtual void operator()(EOT& eo)
|
||||||
{
|
{
|
||||||
if (_eo.invalid())
|
if (eo.invalid())
|
||||||
{
|
{
|
||||||
value()++;
|
value()++;
|
||||||
|
|
||||||
if (_threshold > 0 && value() >= threshold)
|
if (_threshold > 0 && value() >= _threshold)
|
||||||
{
|
{
|
||||||
throw eoEvalFuncCounterBounderException(threshold);
|
throw eoEvalFuncCounterBounderException(_threshold);
|
||||||
}
|
}
|
||||||
|
|
||||||
func(_eo);
|
func(eo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue