Nui
Public Types | Public Member Functions | Static Public Attributes | List of all members
Nui::EventRegistry Class Reference

#include <event_registry.hpp>

Public Types

using RegistryType = SelectablesRegistry< Event >
 
using EventIdType = SelectablesRegistry< Event >::IdType
 

Public Member Functions

 EventRegistry ()=default
 
 EventRegistry (const EventRegistry &)=delete
 
 EventRegistry (EventRegistry &&)=default
 
EventRegistryoperator= (const EventRegistry &)=delete
 
EventRegistryoperator= (EventRegistry &&)=default
 
 ~EventRegistry ()=default
 
EventIdType registerEvent (Event event)
 
RegistryType::SelectionResult activateEvent (EventIdType id)
 Returns a pointer to the selected event (only valid until the next activation or event execution). More...
 
RegistryType::SelectionResult activateAfterEffect (EventIdType id)
 Activate an after effect. More...
 
EventIdType registerAfterEffect (Event event)
 After effects are used to cause something to happen after all other events have been processed. More...
 
void executeEvent (EventIdType id)
 
void executeActiveEvents ()
 
void cleanInvalidEvents ()
 
void removeAfterEffect (EventIdType id)
 
void clear ()
 

Static Public Attributes

constexpr static EventIdType invalidEventId = std::numeric_limits<EventIdType>::max()
 

Member Typedef Documentation

◆ EventIdType

◆ RegistryType

Constructor & Destructor Documentation

◆ EventRegistry() [1/3]

Nui::EventRegistry::EventRegistry ( )
default

◆ EventRegistry() [2/3]

Nui::EventRegistry::EventRegistry ( const EventRegistry )
delete

◆ EventRegistry() [3/3]

Nui::EventRegistry::EventRegistry ( EventRegistry &&  )
default

◆ ~EventRegistry()

Nui::EventRegistry::~EventRegistry ( )
default

Member Function Documentation

◆ activateAfterEffect()

RegistryType::SelectionResult Nui::EventRegistry::activateAfterEffect ( EventIdType  id)
inline

Activate an after effect.

Parameters
id
Returns
RegistryType::SelectionResult

◆ activateEvent()

RegistryType::SelectionResult Nui::EventRegistry::activateEvent ( EventIdType  id)
inline

Returns a pointer to the selected event (only valid until the next activation or event execution).

May return nullptr when the event id was not found.

Parameters
id
Returns
auto*

◆ cleanInvalidEvents()

void Nui::EventRegistry::cleanInvalidEvents ( )
inline

◆ clear()

void Nui::EventRegistry::clear ( )
inline

◆ executeActiveEvents()

void Nui::EventRegistry::executeActiveEvents ( )
inline

◆ executeEvent()

void Nui::EventRegistry::executeEvent ( EventIdType  id)
inline

◆ operator=() [1/2]

EventRegistry& Nui::EventRegistry::operator= ( const EventRegistry )
delete

◆ operator=() [2/2]

EventRegistry& Nui::EventRegistry::operator= ( EventRegistry &&  )
default

◆ registerAfterEffect()

EventIdType Nui::EventRegistry::registerAfterEffect ( Event  event)
inline

After effects are used to cause something to happen after all other events have been processed.

After effects are executed in indeterminate order.

Parameters
event
Returns
EventIdType

◆ registerEvent()

EventIdType Nui::EventRegistry::registerEvent ( Event  event)
inline

◆ removeAfterEffect()

void Nui::EventRegistry::removeAfterEffect ( EventIdType  id)
inline

Member Data Documentation

◆ invalidEventId

constexpr static EventIdType Nui::EventRegistry::invalidEventId = std::numeric_limits<EventIdType>::max()
staticconstexpr

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