Claire's Game Engine
Full C++ Engine using OpenGL
Loading...
Searching...
No Matches
InputEvent Class Reference

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~InputEvent()

InputEvent::~InputEvent ( )

Destructor for InputEvent. Clears the list of subscribed listeners.

Member Function Documentation

◆ NotifyListeners()

void InputEvent::NotifyListeners ( SDL_Event & pEvent) const

Notifies all subscribed listeners of an SDL input event.

Parameters
pEventReference to the SDL_Event to broadcast.

◆ Subscribe()

void InputEvent::Subscribe ( IInputListener * pListener)

Subscribes a listener to receive SDL input events.

Parameters
pListenerPointer to the listener to be added.

◆ Unsubscribe()

void InputEvent::Unsubscribe ( IInputListener * pListener)

Unsubscribes a listener so it no longer receives SDL input events.

Parameters
pListenerPointer to the listener to be removed.

The documentation for this class was generated from the following files: