NRE::System::EventSystem Class Reference

Manage the event sub system. More...

#include <NRE_EventSystem.hpp>

Public Member Functions

 EventSystem ()
 
 EventSystem (EventSystem const &sys)=delete
 
 EventSystem (EventSystem &&sys)=delete
 
 ~EventSystem ()=default
 
void update ()
 
template<class T , class... Args>
bool emit (Args &&...args)
 
template<class T >
void addHandler (Event::EventHandler< T > *handler)
 
template<class T >
void removeHandler (Event::EventHandler< T > *handler)
 
template<class T >
void registerEvent ()
 
EventSystemoperator= (EventSystem const &sys)=delete
 
EventSystemoperator= (EventSystem &&sys)=delete
 

Detailed Description

Manage the event sub system.

Constructor & Destructor Documentation

NRE::System::EventSystem::EventSystem ( )

Construct the sub system

NRE::System::EventSystem::EventSystem ( EventSystem const &  sys)
delete

Copy forbidden

Parameters
systhe event system to copy
NRE::System::EventSystem::EventSystem ( EventSystem &&  sys)
delete

Move forbidden

Parameters
systhe event system to move
NRE::System::EventSystem::~EventSystem ( )
default

EventSystem Deconstructor

Member Function Documentation

template<class T >
void NRE::System::EventSystem::addHandler ( Event::EventHandler< T > *  handler)

Add an event handler

Parameters
handlerthe handler to add
template<class T , class... Args>
bool NRE::System::EventSystem::emit ( Args &&...  args)

Emit a T event by the corresponding emitter

Parameters
argspack of parameter forwarded to the emitters
Returns
if the emitted event has been consumed
EventSystem& NRE::System::EventSystem::operator= ( EventSystem const &  sys)
delete

Copy forbidden

Parameters
systhe object to copy into this
Returns
the reference of himself
EventSystem& NRE::System::EventSystem::operator= ( EventSystem &&  sys)
delete

Move forbidden

Parameters
systhe object to move into this
Returns
the reference of himself
template<class T >
void NRE::System::EventSystem::registerEvent ( )

Register an event to be supported by the system

template<class T >
void NRE::System::EventSystem::removeHandler ( Event::EventHandler< T > *  handler)

Remove an event handler

Parameters
handlerthe handler to remove
void NRE::System::EventSystem::update ( )

Update the event system and dispatch event


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