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(); | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user