50#include <lal/detail/data_array.hpp>
72 void init(std::size_t n)
noexcept {
79 void push(
const T& v)
noexcept {
86 void push(T&& v)
noexcept {
121 std::size_t
size() const noexcept {
Simple array-like fixed-size queue.
Definition: linear_queue.hpp:69
T && pop() noexcept
Pops the first element of the queue.
Definition: linear_queue.hpp:98
void reset() noexcept
Makes the queue usable again.
Definition: linear_queue.hpp:131
std::size_t m_right
Right pointer to m_queue.
Definition: linear_queue.hpp:169
std::size_t size() const noexcept
Returns the size of the queue.
Definition: linear_queue.hpp:121
const T * end() const noexcept
Constant pointer to end.
Definition: linear_queue.hpp:160
void push(const T &v) noexcept
Insert a new element to the queue.
Definition: linear_queue.hpp:79
bool is_full() const noexcept
Is the queue full?
Definition: linear_queue.hpp:151
T & front() noexcept
Returns a reference to the front element.
Definition: linear_queue.hpp:106
void init(std::size_t n) noexcept
Initializes the queue to hold n elements.
Definition: linear_queue.hpp:72
const T * begin() const noexcept
Constant pointer to begin.
Definition: linear_queue.hpp:156
void push(T &&v) noexcept
Insert a new element to the queue.
Definition: linear_queue.hpp:86
std::size_t m_left
Left pointer to m_queue.
Definition: linear_queue.hpp:167
T * begin() noexcept
Pointer to begin.
Definition: linear_queue.hpp:154
const T & front() const noexcept
Returns a constant reference to the front element.
Definition: linear_queue.hpp:114
bool is_exhausted() const noexcept
Has the queue exhausted its resources?
Definition: linear_queue.hpp:142
data_array< T > m_queue
Data (array) of the queue.
Definition: linear_queue.hpp:164
T * end() noexcept
Pointer to end.
Definition: linear_queue.hpp:158
Main namespace of the library.
Definition: basic_types.hpp:50
Wrapper of a C array for autmatic deallocation of memory.
Definition: data_array.hpp:59