Here is my situation:
I have an event driven system where all my handlers are retrieved from a class IHandlerand implement a method onEvent(const Event &event). Event is now the base class for all events and contains only an enumerated event type. All actual events are produced from it, including an event EventKeythat has 2 fields: (uchar) keyCodeand (bool) isDown.
Here's the interesting part: I am generating an event EventKeyusing the following syntax:
Event evt = EventKey(15, true);
and I send it to the handlers:
EventDispatch::sendEvent(evt); // void EventDispatch::sendEvent(const Event &event);
( EventDispatchcontains a linked list IHandlersand calls their method onEvent(const Event &event)with a parameter containing the sent event.
Now the actual question:
, , Event, ?
, .
, , , , EventKey, . - , , .
, , , , - - ? - , ?
, ?