test 2 done
This commit is contained in:
		| @@ -2,6 +2,7 @@ | ||||
| #include "xf/timeout.h" | ||||
| #include "xf/initialevent.h" | ||||
| #include "xf/behavior.h" | ||||
| #include "trace/trace.h" | ||||
|  | ||||
| // TODO done: Implement code for XFBehavior class | ||||
|  | ||||
| @@ -10,9 +11,6 @@ XFBehavior::XFBehavior() { | ||||
| } | ||||
|  | ||||
| XFBehavior::~XFBehavior() { | ||||
|     if (this->deleteOnTerminate()) { | ||||
|         delete this; | ||||
|     } | ||||
| } | ||||
|  | ||||
| void XFBehavior::startBehavior() { | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
|  | ||||
|  | ||||
| XFCustomEvent::XFCustomEvent(int id, interface::XFBehavior *pBehavior): | ||||
|     XFEvent(XFEventType::Unknown, id){ | ||||
|     XFEvent(XFEventType::Event, id){ | ||||
|     setBehavior(pBehavior); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -37,7 +37,7 @@ void XFDispatcher::dispatchEvent(const XFEvent *pEvent) const { | ||||
|     //Trace::out("[DEBUG] - Dispatch Event"); | ||||
|     XFBehavior::TerminateBehavior terminateBehavior; | ||||
|     terminateBehavior = pEvent->getBehavior()->process(pEvent); | ||||
|     if(terminateBehavior) { | ||||
|     if(terminateBehavior && pEvent->getBehavior()->deleteOnTerminate()) { | ||||
|         delete pEvent->getBehavior(); | ||||
|         if(pEvent->deleteAfterConsume()) { | ||||
|             delete pEvent; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user