Claire's Game Engine
Full C++ Engine using OpenGL
|
InputEvent is responsible for managing a list of input listeners and broadcasting SDL events to them. Listeners can subscribe or unsubscribe to receive event notifications. More...
#include <InputEvent.h>
Public Member Functions | |
~InputEvent () | |
Destructor for InputEvent. Clears the list of subscribed listeners. | |
void | Subscribe (IInputListener *pListener) |
Subscribes a listener to receive SDL input events. | |
void | Unsubscribe (IInputListener *pListener) |
Unsubscribes a listener so it no longer receives SDL input events. | |
void | NotifyListeners (SDL_Event &pEvent) const |
Notifies all subscribed listeners of an SDL input event. | |
InputEvent is responsible for managing a list of input listeners and broadcasting SDL events to them. Listeners can subscribe or unsubscribe to receive event notifications.
InputEvent::~InputEvent | ( | ) |
Destructor for InputEvent. Clears the list of subscribed listeners.
void InputEvent::NotifyListeners | ( | SDL_Event & | pEvent | ) | const |
Notifies all subscribed listeners of an SDL input event.
pEvent | Reference to the SDL_Event to broadcast. |
void InputEvent::Subscribe | ( | IInputListener * | pListener | ) |
Subscribes a listener to receive SDL input events.
pListener | Pointer to the listener to be added. |
void InputEvent::Unsubscribe | ( | IInputListener * | pListener | ) |
Unsubscribes a listener so it no longer receives SDL input events.
pListener | Pointer to the listener to be removed. |