Fixed-size, frame-based event queue. More...
#include <EventQueue.h>
Public Member Functions | |
| template<typename EventT> requires (DerivedFrom<Event, EventT>) | |
| constexpr bool | Push (const EventT &e) noexcept |
| Adds a new event to the queue. | |
| constexpr void | Clear () noexcept |
| Clears all events from the queue. | |
| constexpr u32 | Size () const noexcept |
| Returns the current number of events in the queue. | |
| constexpr bool | Empty () const noexcept |
| Checks whether the queue is empty. | |
Public Attributes | |
| u32 | Count = 0 |
| Current number of valid events in the queue. | |
| std::array< EventSlot, MaxEventsPerFrame > | Events {} |
| Preallocated storage for events. | |
Fixed-size, frame-based event queue.
Stores events in a pre-allocated array of EventSlots, providing fast sequential iteration and zero-cost clearing between frames.
|
inlineconstexprnoexcept |
Clears all events from the queue.
|
inlinenodiscardconstexprnoexcept |
Checks whether the queue is empty.
|
inlineconstexprnoexcept |
Adds a new event to the queue.
| EventT | Type of the event. |
| e | Event instance to push. |
|
inlinenodiscardconstexprnoexcept |
Returns the current number of events in the queue.
| u32 Raven::EventQueue::Count = 0 |
Current number of valid events in the queue.
| std::array<EventSlot, MaxEventsPerFrame> Raven::EventQueue::Events {} |
Preallocated storage for events.