Ocular Engine
|
#include <CircularQueue.hpp>
Public Member Functions | |
CircularQueue () | |
bool | enqueue (T const element) |
bool | dequeue (T &retElement) |
bool | dequeue () |
bool | peek (T &retElement) |
unsigned | getNumElements () const |
void | clear () |
Implementation of a circular queue with O(1) push and pop.
|
inline |
[in] | size | Starting size of the internal array. |
|
inline |
Removes all elements from the queue.
|
inline |
Dequeues an element from the queue if it is not empty.
[out] | retElement | The element removed from the queue. |
|
inline |
Adds the element to the queue.
|
inline |
|
inline |
[out] | retElement | Element at the front of the queue. |