FRAMES NO FRAMES

Macro ILOIIMLISTENER0

Definition file: ilsolver/iimevent.h
ILOIIMLISTENER0(N, ET, E)
ILOIIMLISTENER1(N, ET, E, T1, V1)
ILOIIMLISTENER2(N, ET, E, T1, V1, T2, V2)
ILOIIMLISTENER3(N, ET, E, T1, V1, T2, V2, T3, V3)
ILOIIMLISTENER4(N, ET, E, T1, V1, T2, V2, T3, V3, T4, V4)
ILOIIMLISTENER5(N, ET, E, T1, V1, T2, V2, T3, V3, T4, V4, T5, V5)
ILOIIMLISTENER6(N, ET, E, T1, V1, T2, V2, T3, V3, T4, V4, T5, V5, T6, V6)
ILOIIMLISTENER7(N, ET, E, T1, V1, T2, V2, T3, V3, T4, V4, T5, V5, T6, V6, T7, V7)
ILOIIMLISTENER8(N, ET, E, T1, V1, T2, V2, T3, V3, T4, V4, T5, V5, T6, V6, T7, V7, T8, V8)
A macro to define custom listeners.

The body of this macro defines a piece of code to execute when the object to which the listener is added emits the event in question. No value is returned from a listener.

The listener macro takes three mandatory parameters:

Depending on the specific macro used, optional parameters can be added using pairs of arguments specifying the parameter type and the parameter name.

The following code from the example YourSolverHomeexamplessrcea1max_listen.cpp defines a listener which monitors operator invocation:

ILOIIMLISTENER0(OperatorListener, IloPoolOperator::InvocationEvent, event) {
  IloPoolOperator op = event.getOperator();
  OperatorStatistics * stat = GetOperatorStatistics(op);
  stat->invocations++;
}

See Also: