2#include "TermMaxGenOp.h"
7 uint *maxgen =
new uint(0);
8 state->getRegistry()->registerEntry(
"term.maxgen", (voidP) maxgen, ECF::UINT,
9 "max number of generations (default: none)");
15 voidP sptr = state->getRegistry()->getEntry(
"term.maxgen");
16 nGenerations_ = *((uint*) sptr.get());
18 if(state->getRegistry()->isModified(
"term.maxgen"))
27 if(state->getGenerationNo() >= nGenerations_) {
28 state->setTerminateCond();
29 ECF_LOG(state, 1,
"Termination: max generation reached (" + uint2str(nGenerations_) +
")");
bool operate(StateP)
perform the designated operation
bool initialize(StateP)
Perform initialization. Called before Operator::operate. By default, if the return value is false,...
void registerParameters(StateP)
Register parameters with the Registry. Called before Operator::initialize.