![]() |
GemaMesh
The GeMA Mesh Plugin
|
A helper queue class implemented over a QVector with amortized O(1) enqueue and dequeue operations. Never shrinks the storage. More...
#include <uibhmQueue.h>

Public Member Functions | |
| bool | empty () const |
| int | size () const |
| void | enqueue (const T &value) |
| T | dequeue () |
Private Member Functions | |
| void | grow () |
Private Attributes | |
| QVector< T > | _data |
| The underlying vector. | |
| int | _head |
| Index of the front of the queue (first used) | |
| int | _tail |
| Index of the first empty in the back after used entries (wraps around the vector border). | |
| int | _size |
| Number of elements in the queue. | |
A helper queue class implemented over a QVector with amortized O(1) enqueue and dequeue operations. Never shrinks the storage.
Notice that std:queue uses a deque as its base, which is much more complicated than what we really need: a simple queue over a circular vector