class
#include <Core/Logger.h>
TransitEventBuffer Circular buffer for transit events.
This class should not usually be used directly.
Constructors, destructors, conversion operators
-
TransitEventBuffer(std::
size_t initialCapacity) explicit - TransitEventBuffer(TransitEventBuffer const&) deleted
- TransitEventBuffer(TransitEventBuffer&& other) noexcept
Public functions
- auto operator=(TransitEventBuffer const&) -> TransitEventBuffer& deleted
- auto operator=(TransitEventBuffer&& other) -> TransitEventBuffer& noexcept
- auto front() -> TransitEvent* noexcept
- Returns a pointer to the first transit event in the buffer, or
nullptr
if the buffer is empty. - void pop_front() noexcept
- Consumes the first transit event from the buffer.
- auto back() -> TransitEvent* noexcept
- Returns a pointer to the last transit event in the buffer, or expands the buffer if it is full.
- void push_back() noexcept
- Adds a new transit event to be consumed.
-
auto size() const -> std::
size_t noexcept - Returns the number of unconsumed events.
-
auto capacity() const -> std::
size_t noexcept - Returns the capacity of the buffer.
- auto empty() const -> bool noexcept
- Returns
true
if the buffer is empty.