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
Event.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_EVENTS_EVENT_HPP_
9#define GALAXY_EVENTS_EVENT_HPP_
10
11namespace galaxy
12{
16 class Event
17 {
18 public:
22 Event() noexcept;
23
27 Event(Event&&) noexcept;
28
32 Event& operator=(Event&&) noexcept;
33
37 Event(const Event&) noexcept;
38
42 Event& operator=(const Event&) noexcept;
43
47 virtual ~Event() noexcept;
48
52 void consume() noexcept;
53
59 [[nodiscard]]
60 bool consumed() const noexcept;
61
62 protected:
67 };
68} // namespace galaxy
69
70#endif
Base type of all events.
Definition Event.hpp:17
Event() noexcept
Constructor.
Definition Event.cpp:12
virtual ~Event() noexcept
Destructor.
Definition Event.cpp:47
Event & operator=(Event &&) noexcept
Move assignment operator.
Definition Event.cpp:22
bool consumed() const noexcept
Is this event already consumed?
Definition Event.cpp:56
void consume() noexcept
Mark this event as consumed.
Definition Event.cpp:51
bool m_handled
Keeps track if event has been used already.
Definition Event.hpp:66
Application.hpp galaxy.