FRAMES NO FRAMES

Macro ILCSCHEDULEDEMON

Definition file: ilsched/schedule.h
ILCSCHEDULEDEMON(DemonClass, ConstraintClass, method)

This macro creates an instance of the class DemonClass which is a subclass of IlcScheduleDemon. When this demon is triggered, it executes the function method of the constraint ConstraintClass given as parameter to the macro. The signature of this method must be: void ConstraintClass::method(IlcActivity act). The activity given as argument is the one that is responsible for the triggering of the demon; for example, the activity whose set of successors has changed.

Once the schedule demon class has been defined with the macro ILCSCHEDULEDEMON(DemonClass, ConstraintClass, method), an instance of this demon can be created by passing an instance of ConstraintClass as a parameter as follows:

 ConstraintClass* ct = ...;
 IlcScheduleDemon myDemon = DemonClass(ct); 

See ILCRESOURCEDEMON for an example of code using a similar macro.

See Also: