File: LoopGuard.h
Description:
See
also:
namespace Pythia7
template <typename ExceptionT = Exception,
typename MessageT = const char *>
CLASS
LoopGuard
Public members:
inline LoopGuard(const MessageT & mess, long maxc = 1000000 );
Create a loop guard which will throw an exception of type
ExceptionT, constructed with 'mess' as argument, if the maximum
number of iterations is exceeded.
void operator()() throw (ExceptionT);
Increase the iteration count and throw an ExceptionT if the
maximum number of iterations is exceeded.
Private members:
long count;
The number of counts so far.
long maxCount;
The maximum number of counts allowed.
const MessageT & message;
The message with which the thrown ExceptionT object will be
initialized.
LoopGuard() {}
LoopGuard(const LoopGuard &) {}
Standard ctors are private
DEFINED MACROS
INCLUDED FILES