24#ifndef _UIBHM_QUEUE_H_
25#define _UIBHM_QUEUE_H_
42 bool empty()
const {
return !
_size; }
43 int size()
const {
return _size; }
45 void enqueue(
const T& value)
68 for(
int i = 0; i <
_size; i++)
A helper queue class implemented over a QVector with amortized O(1) enqueue and dequeue operations....
Definition uibhmQueue.h:38
int _head
Index of the front of the queue (first used)
Definition uibhmQueue.h:77
QVector< T > _data
The underlying vector.
Definition uibhmQueue.h:76
int _size
Number of elements in the queue.
Definition uibhmQueue.h:79
int _tail
Index of the first empty in the back after used entries (wraps around the vector border).
Definition uibhmQueue.h:78
void swap(QVector< T > &other)