CoreFlow 1.0.0
A modern orchestration and execution runtime
|
Circular queue implementation. More...
#include <circular_queue.hpp>
Public Member Functions | |
CircularQueue () | |
Construct a new Circular Queue object. | |
bool | enqueue (const T &ref) |
Enqueue an element into the queue. | |
bool | dequeue (T &out) |
Dequeue an element from the queue. | |
bool | peek (T &out) const |
Peek at the element at the front of the queue without removing it. | |
std::size_t | size () const |
Get the size of the queue. | |
bool | empty () const |
Check if the queue is empty. | |
bool | full () const |
Check if the queue is full. | |
Circular queue implementation.
T | Type of elements in the queue |
MaxDepth | Maximum depth of the queue |
|
inline |
Construct a new Circular Queue object.
|
inline |
Dequeue an element from the queue.
out | Reference to store the dequeued element |
|
inline |
Check if the queue is empty.
|
inline |
Enqueue an element into the queue.
ref | Element to enqueue |
|
inline |
Check if the queue is full.
|
inline |
Peek at the element at the front of the queue without removing it.
out | Reference to store the peeked element |
|
inline |
Get the size of the queue.