4#include "xf/interface/behavior.h"
5#include "xf/interface/dispatcher.h"
6#include "xf/eventstatus.h"
7#include "xf/initialevent.h"
8#include "xf/defaulttransition.h"
31 #define GEN(event) pushEvent(new event)
68 void setCurrentEvent(
const XFEvent * pEvent);
Base class for state machines, activities, process and data flows.
Definition: behavior.h:29
virtual XFEventStatus processEvent()=0
XFBehavior()
Default constructor for the behavior.
bool deleteOnTerminate() const override
Tells XF to delete behavior when receiving terminate event.
const XFEvent * pCurrentEvent_
Reference to actually processed event.
Definition: behavior.h:87
void pushEvent(XFEvent *pEvent) override
Injects an event into the class.
void unscheduleTimeout(int timeoutId)
Unschedules a timeout for this state machine.
Definition: behavior.h:65
void scheduleTimeout(int timeoutId, int interval)
Schedules a timeout for this state machine.
Definition: behavior.h:64
void startBehavior() override
Starts the behavior, resp. the state machine.
interface::XFDispatcher * getDispatcher()
Returns reference to actual dispatcher.
bool deleteOnTerminate_
Indicates if the behavior can be deleted after reception of a 'terminate event'.
Definition: behavior.h:86
const XFTimeout * getCurrentTimeout()
Returns a reference to the actually processed timeout.
void setDeleteOnTerminate(bool deleteBehaviour) override
Sets/Clears the 'delete on terminate' property.
const XFEvent * getCurrentEvent() const
Returns the current event to be processed in processEvent().
Base class for all types of events and timeouts.
Definition: event.h:23
Event status returned after event processing.
Definition: eventstatus.h:16
Used by the TimeoutManager to create and handle a timeout.
Definition: timeout.h:28
Interface to receive and process events.
Definition: behavior.h:24
bool TerminateBehavior
Type returned by the process() method.
Definition: behavior.h:30
Interface for the XF dispatcher providing the event processing loop.
Definition: dispatcher.h:29
virtual void unscheduleTimeout(int timeoutId, interface::XFBehavior *pBehavior)=0
Removes all timeouts corresponding the given parameters.
virtual void scheduleTimeout(int timeoutId, int interval, interface::XFBehavior *pBehavior)=0
Adds a new timeout to be handled.