Initial commit
This commit is contained in:
24
test-bench/test3/src/events/eventids.h
Normal file
24
test-bench/test3/src/events/eventids.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef EVENTIDS_H
|
||||
#define EVENTIDS_H
|
||||
|
||||
/**
|
||||
* This class is responsible to distribute to every event
|
||||
* used in the project a different event id.
|
||||
*
|
||||
* Only values grater than zero should be used
|
||||
*
|
||||
*/
|
||||
class EventId
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* The event identifiers available
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
Unknown = 0, ///< Unknown event. Must not be used.
|
||||
evRestart = 1 ///< Restart event
|
||||
} eEventId;
|
||||
};
|
||||
|
||||
#endif // EVENTIDS_H
|
9
test-bench/test3/src/events/evrestart.cpp
Normal file
9
test-bench/test3/src/events/evrestart.cpp
Normal file
@ -0,0 +1,9 @@
|
||||
#include "evrestart.h"
|
||||
|
||||
evRestart::evRestart() : XFCustomEvent(EventId::evRestart)
|
||||
{
|
||||
}
|
||||
|
||||
evRestart::~evRestart()
|
||||
{
|
||||
}
|
19
test-bench/test3/src/events/evrestart.h
Normal file
19
test-bench/test3/src/events/evrestart.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef EVRESTART_H
|
||||
#define EVRESTART_H
|
||||
|
||||
|
||||
#include "xf/customevent.h"
|
||||
#include "eventids.h"
|
||||
|
||||
|
||||
/**
|
||||
* Restart event used to reset a state machine
|
||||
*/
|
||||
class evRestart : public XFCustomEvent
|
||||
{
|
||||
public:
|
||||
evRestart();
|
||||
~evRestart() override;
|
||||
};
|
||||
|
||||
#endif // EVRESTART_H
|
Reference in New Issue
Block a user