implement events

This commit is contained in:
Rémi Heredero 2023-10-05 11:48:10 +02:00
parent 25f77289d7
commit ed95e01cf3
4 changed files with 34 additions and 3 deletions

View File

@ -1,3 +1,15 @@
#include "xf/customevent.h" #include "xf/customevent.h"
// TODO: Implement code for XFCustomEvent class // TODO done: Implement code for XFCustomEvent class
XFCustomEvent::XFCustomEvent(int id, interface::XFBehavior *pBehavior):
XFEvent(XFEventType::Unknown, id){
setBehavior(pBehavior);
}
bool XFCustomEvent::deleteAfterConsume() const {
return bDeleteAfterConsume_;
}

View File

@ -1,3 +1,12 @@
#include "xf/defaulttransition.h" #include "xf/defaulttransition.h"
// TODO: Implement code for XFDefaultTransition class // TODO done: Implement code for XFDefaultTransition class
XFDefaultTransition::XFDefaultTransition():
XFEvent(XFEventType::DefaultTransition) {
}
bool XFDefaultTransition::deleteAfterConsume() const {
return true;
}

View File

@ -1,3 +1,12 @@
#include "xf/initialevent.h" #include "xf/initialevent.h"
// TODO: Implement code for XFInitialEvent class // TODO done: Implement code for XFInitialEvent class
XFInitialEvent::XFInitialEvent():
XFEvent(XFEventType::Initial) {
}
bool XFInitialEvent::deleteAfterConsume() const {
return true;
}

View File

@ -4,6 +4,7 @@
XFTimeout::XFTimeout(int id, int interval, interface::XFBehavior *pBehavior): XFTimeout::XFTimeout(int id, int interval, interface::XFBehavior *pBehavior):
XFEvent(XFEventType::Timeout, id), interval_(interval) { XFEvent(XFEventType::Timeout, id), interval_(interval) {
setBehavior(pBehavior);
} }
bool XFTimeout::operator ==(const XFTimeout &timeout) const { bool XFTimeout::operator ==(const XFTimeout &timeout) const {