SUNENGINE 0.0.2
A simple and bright C++ game engine.
 
Loading...
Searching...
No Matches
KeyboardEventManager Class Reference

Manages the registration and processing of keyboard events for GameObjects. More...

#include <KeyboardEventManager.h>

Public Types

using StorageMapRef = MapKeyManager::iterator
 Type alias for the storage map iterator.
 
using StorageMapMouseRef = MapMouseKeyManager::iterator
 Type alias for the storage map mouse iterator.
 

Public Member Functions

 KeyboardEventManager (const KeyboardEventManager &)=delete
 
KeyboardEventManageroperator= (const KeyboardEventManager &)=delete
 
void Register (Inputable *in, AZUL_KEY k, EventType e)
 Registers a keyboard event for a GameObject.
 
void Deregister (Inputable *in, AZUL_KEY k, EventType e)
 Deregisters a keyboard event for a GameObject.
 
void Register (Inputable *in, AZUL_MOUSE m, EventType e)
 Registers a mouse key event for a GameObject.
 
void Deregister (Inputable *in, AZUL_MOUSE m, EventType e)
 Deregisters a mouse key event for a GameObject.
 
void ProcessElements ()
 Processes all registered keyboard events.
 

Private Types

using MapKeyManager = std::multimap<AZUL_KEY, SingleKeyEventManager*>
 Type alias for the map of single key event managers.
 
using MapMouseKeyManager = std::multimap<AZUL_MOUSE, MouseKeyEventManager*>
 Type alias for the map of mouse key event managers.
 

Private Attributes

MapKeyManagermapSKMgrs
 Pointer to the map of single key event managers.
 
MapMouseKeyManagermapMouseKeyMgrs
 Pointer to the map of mouse key event managers.
 

Detailed Description

Manages the registration and processing of keyboard events for GameObjects.

The KeyboardEventManager class is responsible for managing the registration and processing of keyboard events for GameObjects. It provides methods to register, deregister, and process keyboard events.

Member Function Documentation

◆ Deregister() [1/2]

void KeyboardEventManager::Deregister ( Inputable * in,
AZUL_KEY k,
EventType e )

Deregisters a keyboard event for a GameObject.

Parameters
inPointer to the GameObject.
kThe key to deregister.
eThe event type to deregister.
Here is the call graph for this function:

◆ Deregister() [2/2]

void KeyboardEventManager::Deregister ( Inputable * in,
AZUL_MOUSE m,
EventType e )

Deregisters a mouse key event for a GameObject.

Parameters
inPointer to the GameObject.
mThe mouse key to deregister.
eThe event type to deregister.
Here is the call graph for this function:

◆ Register() [1/2]

void KeyboardEventManager::Register ( Inputable * in,
AZUL_KEY k,
EventType e )

Registers a keyboard event for a GameObject.

Parameters
inPointer to the GameObject.
kThe key to register.
eThe event type to register.
Here is the call graph for this function:

◆ Register() [2/2]

void KeyboardEventManager::Register ( Inputable * in,
AZUL_MOUSE m,
EventType e )

Registers a mouse key event for a GameObject.

Parameters
inPointer to the GameObject.
mThe mouse key to register.
eThe event type to register.
Here is the call graph for this function:

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