Simplified XF 1.1.0

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
XFCustomEvent Class Reference
XF Core Classes

Base class for project related events. More...

`#include <customevent.h>`

Inheritance diagram for XFCustomEvent:
Collaboration diagram for XFCustomEvent:

## Public Member Functions
| XFCustomEvent (int id, interface::XFBehavior *pBehavior=nullptr)
bool | deleteAfterConsume () const override
| Tells the XF if the event should be deleted after processing. More...
Public Member Functions inherited from XFEvent
| XFEvent (XFEventType eventType, int id=0)
| Standard constructor. More...
virtual | ~XFEvent ()
| Class destructor.
XFEventType | getEventType () const
| Returns the type of the event. More...
interface::XFBehavior * | getBehavior () const
| Returns pointer to behavioral class. More...
void | setBehavior (interface::XFBehavior *pBehavior)
| Sets pointer to behavioral class (see pBehavior_). Sets the behavior in which the event should be executed.
int | getId () const
| Returns id_ identifying the event in the behaviors context.

## Protected Member Functions
void | setDeleteAfterConsume (bool bDeleteAfterConsume=true)
| Setter for bDeleteAfterConsume_ attribute. More...

## Protected Attributes
bool | bDeleteAfterConsume_
| True if the XF should delete event after consumption/dispatching.
Protected Attributes inherited from XFEvent
const XFEventType | eventType_
| Holds the type of the event.
int | id_
| Event id to identify event in state-machine.
interface::XFBehavior * | pBehavior_
| Pointer to behavioral class (ex. state-machine) processing the event.

## Additional Inherited Members
Public Types inherited from XFEvent
enum | XFEventType { Unknown = 0 , Initial = 1 , DefaultTransition = 2 , Event = 3 , Timeout = 4 }

## Detailed Description

Base class for project related events.

It is possible to create custom events by deriving new classes/events from this class. All custom events have `#Event` as event type. In the state machine the event can be uniquely identified with `getEventType() == Event` and the event id `getId()` given to the object at construction time.

It is up to the devoper to handle the different event ids.

## Constructor & Destructor Documentation

## ◆ XFCustomEvent()

XFCustomEvent::XFCustomEvent | ( | int | id,
|  | interface::XFBehavior * | pBehavior = `nullptr`
| ) |  |

Constructor for the class

Parameters

  id | Event identifier to identify the custom event (in the context of the behavior).
  pBehavior | The behavior for which the event was constructed (will consume the event).

## Member Function Documentation

## ◆ deleteAfterConsume()

bool XFCustomEvent::deleteAfterConsume | ( |  | ) | const
| inline override virtual

Tells the XF if the event should be deleted after processing.

Returns
  True if the event should be deleted.

Reimplemented from XFEvent.

## ◆ setDeleteAfterConsume()

void XFCustomEvent::setDeleteAfterConsume | ( | bool | bDeleteAfterConsume = `true` | ) |
| inline protected

Setter for bDeleteAfterConsume_ attribute.

Parameters

  bDeleteAfterConsume | Parameter to be assigned. Default: true.

The documentation for this class was generated from the following file:

- C:/Users/thomas.sterren/Desktop/PTR_XF_Release/03-release/work/src/simplified/xf/include/xf/customevent.h