should be finish but for sure won't work
This commit is contained in:
@ -35,7 +35,10 @@ XFDispatcher::~XFDispatcher() {
|
||||
}
|
||||
|
||||
void XFDispatcher::dispatchEvent(const XFEvent *pEvent) const {
|
||||
pEvent->getBehavior()->startBehavior();
|
||||
if(pEvent->getBehavior()->process(pEvent)) { // TODO look weird
|
||||
//events_.pop();
|
||||
delete pEvent;
|
||||
}
|
||||
}
|
||||
|
||||
void XFDispatcher::pushEvent(XFEvent *pEvent) {
|
||||
@ -51,11 +54,16 @@ void XFDispatcher::unscheduleTimeout(int timeoutId, interface::XFBehavior *pBeha
|
||||
}
|
||||
|
||||
void XFDispatcher::executeOnce() {
|
||||
//XFEvent* event;
|
||||
dispatchEvent(events_.front());
|
||||
events_.pop();
|
||||
|
||||
}
|
||||
|
||||
int XFDispatcher::execute(const void *param) {
|
||||
|
||||
while(true){
|
||||
executeOnce();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,6 +13,12 @@ interface::XFMutex * interface::XFMutex::create()
|
||||
return new ::XFMutex;
|
||||
}
|
||||
|
||||
void XFMutex::lock() {
|
||||
}
|
||||
|
||||
void XFMutex::unlock() {
|
||||
}
|
||||
|
||||
// TODO: Implement code for XFMutex class
|
||||
|
||||
#endif // USE_XF_IDF_STM32_MUTEX_CLASS
|
||||
|
Reference in New Issue
Block a user