Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
EventManager Class Reference

#include <EventManager.h>

Public Types

using Message = ::Message
 
using Listener = std::function< void(const Message &)>
 

Public Member Functions

 EventManager ()
 
 ~EventManager ()
 
void AddMessage (const Message &msg)
 
void DispatchImmediate (const Message &msg)
 
void Process ()
 
void Register (void *owner, EventType type, Listener callback)
 
template<typename T >
void Register (T *owner, EventType type)
 
void Unregister (void *owner, EventType type)
 
void UnregisterAll (void *owner)
 

Static Public Member Functions

static EventManagerGetInstance ()
 
static EventManagerGet ()
 

Detailed Description

Definition at line 13 of file EventManager.h.

Member Typedef Documentation

◆ Listener

Definition at line 17 of file EventManager.h.

◆ Message

Definition at line 16 of file EventManager.h.

Constructor & Destructor Documentation

◆ EventManager()

EventManager::EventManager ( )
inline

Definition at line 19 of file EventManager.h.

◆ ~EventManager()

EventManager::~EventManager ( )
inline

Definition at line 20 of file EventManager.h.

Member Function Documentation

◆ AddMessage()

void EventManager::AddMessage ( const Message msg)
inline

Definition at line 31 of file EventManager.h.

◆ DispatchImmediate()

void EventManager::DispatchImmediate ( const Message msg)
inline

Definition at line 32 of file EventManager.h.

◆ Get()

static EventManager & EventManager::Get ( )
inlinestatic

Definition at line 28 of file EventManager.h.

References GetInstance().

Referenced by AI_Player::AI_Player(), PanelManager::Initialize(), ObjectFactory::ObjectFactory(), AI_Player::~AI_Player(), and ObjectFactory::~ObjectFactory().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetInstance()

static EventManager & EventManager::GetInstance ( )
inlinestatic

Definition at line 23 of file EventManager.h.

References GetComponentTypeID_Static().

Referenced by Get().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Process()

void EventManager::Process ( )
inline

Definition at line 33 of file EventManager.h.

◆ Register() [1/2]

template<typename T >
void EventManager::Register ( T owner,
EventType  type 
)
inline

Definition at line 38 of file EventManager.h.

◆ Register() [2/2]

void EventManager::Register ( void owner,
EventType  type,
Listener  callback 
)
inline

Definition at line 35 of file EventManager.h.

Referenced by AI_Player::AI_Player(), PanelManager::Initialize(), and ObjectFactory::ObjectFactory().

+ Here is the caller graph for this function:

◆ Unregister()

void EventManager::Unregister ( void owner,
EventType  type 
)
inline

Definition at line 40 of file EventManager.h.

Referenced by ObjectFactory::~ObjectFactory().

+ Here is the caller graph for this function:

◆ UnregisterAll()

void EventManager::UnregisterAll ( void owner)
inline

Definition at line 41 of file EventManager.h.

Referenced by AI_Player::~AI_Player().

+ Here is the caller graph for this function:

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