This
method is used by the event loop (within the thread) to make the reactive
object process an event. After some preliminary processing, the takeEvent method
calls processEvent to
consume the event. This is a virtual function and can be overridden.
Signaturevirtual TakeEventStatus takeEvent(OMEvent* ev);
Parametersev
Specifies the event to be processed
ReturnsThe
method returns one of the values defined in the TakeEventStatus enumerated
type. You can use these values to determine whether and how to continue
with event processing on the reactive object. The possible values
are as follows:
- OMTakeEventCompletedEventNotConsumed
(0) -
The event was completed, but not consumed.
- OMTakeEventCompleted
(1) - The
event was completed (normal status).
- OMTakeEventInDtor
(2) - The event
was not completed because the OMReactive instance
is in destruction.
- OMTakeEventReachTerminate
(3) -
The event was not completed because the statechart reached a termination
connector and the reactive object is destroyed.
Notes- This
method is used by the framework. Typically,
you do not use it unless you want to rewrite the event consumption.
- The execute method calls takeEvent to
process the reactive object an event.