Interface for event listener. More...
#include <event_listener.h>
Inherited by CEGUI::NeLRenderer::NeLInputDriver, NL3D::CEvent3dMouseListener, and NLMISC::CEventListenerAsync.
Public Member Functions | |
| IEventListener () | |
| Constructor. | |
| virtual | ~IEventListener () |
| Destructor. | |
| virtual void | process (const CEvent &event) |
| Called by CServer::pumpEvent(). | |
| virtual void | operator() (const CEvent &event)=0 |
| Call back of the listener. | |
| void | setHook (IEventListener *hook) |
| IEventListener * | getHook () const |
Private Attributes | |
| IEventListener * | _Hook |
Interface for event listener.
A listener provides a callback.
Definition at line 43 of file event_listener.h.
| NLMISC::IEventListener::IEventListener | ( | ) |
Constructor.
Definition at line 37 of file event_listener.cpp.
| virtual NLMISC::IEventListener::~IEventListener | ( | ) | [inline, virtual] |
Destructor.
Definition at line 50 of file event_listener.h.
| IEventListener* NLMISC::IEventListener::getHook | ( | ) | const [inline] |
Definition at line 75 of file event_listener.h.
References _Hook.
| virtual void NLMISC::IEventListener::operator() | ( | const CEvent & | event | ) | [pure virtual] |
Call back of the listener.
| event | is the event send to the listener |
Implemented in NL3D::CEvent3dMouseListener, CEGUI::NeLRenderer::NeLInputDriver, and NLMISC::CEventListenerAsync.
| virtual void NLMISC::IEventListener::process | ( | const CEvent & | event | ) | [inline, virtual] |
Called by CServer::pumpEvent().
The default calls the () operator, unless a hook has been set. In this case processEvent is called on the hook instead (the hook can forward the call to that listener afterwards).
Definition at line 55 of file event_listener.h.
References _Hook, and process().
Referenced by process(), and NLMISC::CEventServer::pumpEvent().
| void NLMISC::IEventListener::setHook | ( | IEventListener * | hook | ) | [inline] |
Definition at line 74 of file event_listener.h.
References _Hook.
IEventListener* NLMISC::IEventListener::_Hook [private] |
Definition at line 77 of file event_listener.h.
1.6.1