+ eoEvalFuncCounterBounder.h: inherits of eoEvalFuncCounter in adding an exception throwing when a threshold of evaluation has been reached

This commit is contained in:
Caner Candan 2010-08-31 16:35:50 +02:00
commit f98e138562

View file

@ -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);
} }
} }