galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
galaxy::Event Class Reference

Base type of all events. More...

#include <Event.hpp>

+ Inheritance diagram for galaxy::Event:
+ Collaboration diagram for galaxy::Event:

Public Member Functions

 Event () noexcept
 Constructor.
 
 Event (Event &&) noexcept
 Move constructor.
 
Eventoperator= (Event &&) noexcept
 Move assignment operator.
 
 Event (const Event &) noexcept
 Copy constructor.
 
Eventoperator= (const Event &) noexcept
 Copy assignment operator.
 
virtual ~Event () noexcept
 Destructor.
 
void consume () noexcept
 Mark this event as consumed.
 
bool consumed () const noexcept
 Is this event already consumed?
 

Protected Attributes

bool m_handled
 Keeps track if event has been used already.
 

Detailed Description

Base type of all events.

Definition at line 16 of file Event.hpp.

Constructor & Destructor Documentation

◆ Event() [1/3]

galaxy::Event::Event ( )
noexcept

Constructor.

Definition at line 12 of file Event.cpp.

◆ Event() [2/3]

galaxy::Event::Event ( Event && e)
noexcept

Move constructor.

Definition at line 17 of file Event.cpp.

◆ Event() [3/3]

galaxy::Event::Event ( const Event & e)
noexcept

Copy constructor.

Definition at line 32 of file Event.cpp.

◆ ~Event()

galaxy::Event::~Event ( )
virtualnoexcept

Destructor.

Definition at line 47 of file Event.cpp.

Member Function Documentation

◆ operator=() [1/2]

Event & galaxy::Event::operator= ( Event && e)
noexcept

Move assignment operator.

Definition at line 22 of file Event.cpp.

◆ operator=() [2/2]

Event & galaxy::Event::operator= ( const Event & e)
noexcept

Copy assignment operator.

Definition at line 37 of file Event.cpp.

◆ consume()

void galaxy::Event::consume ( )
noexcept

Mark this event as consumed.

Definition at line 51 of file Event.cpp.

+ Here is the caller graph for this function:

◆ consumed()

bool galaxy::Event::consumed ( ) const
nodiscardnoexcept

Is this event already consumed?

Returns
True if this event has been handled already.

Definition at line 56 of file Event.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_handled

bool galaxy::Event::m_handled
protected

Keeps track if event has been used already.

Definition at line 66 of file Event.hpp.


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