Helper class to allow limited size FIFO queues implemented as vector of elements.
More...
|
| | vector_queue (size_type size_max) |
| | Construct queue of fixed size.
|
| |
| | vector_queue (const vector_queue< value_type > &other) |
| | Copies existing queue.
|
| |
|
virtual | ~vector_queue () |
| | Destroys the queue.
|
| |
| | vector_queue (vector_queue< value_type > &&other) |
| | Moves existing queue.
|
| |
| vector_queue< value_type > & | operator= (const vector_queue< value_type > &other) |
| | Copies existing queue.
|
| |
| vector_queue< value_type > & | operator= (vector_queue< value_type > &&other) |
| | Moves existing queue.
|
| |
|
size_type | size () const |
| | Returns the number of elements in the vector.
|
| |
|
size_type | capacity () const |
| | Returns the number of elements that the queue can contain before overwriting head ones.
|
| |
|
void | clear () |
| | Erases the elements of the queue.
|
| |
|
bool | empty () const |
| | Tests if the queue is empty.
|
| |
| reference | at (size_type pos) |
| | Returns a reference to the element at a specified location in the queue.
|
| |
| reference | operator[] (size_type pos) |
| | Returns a reference to the element at a specified location in the queue.
|
| |
| const_reference | at (size_type pos) const |
| | Returns a constant reference to the element at a specified location in the queue.
|
| |
| const_reference | operator[] (size_type pos) const |
| | Returns a constant reference to the element at a specified location in the queue.
|
| |
| reference | at_abs (size_type pos) |
| | Returns a reference to the element at the absolute location in the queue.
|
| |
| const_reference | at_abs (size_type pos) const |
| | Returns a constant reference to the element at the absolute location in the queue: measured from the beginning of the storage.
|
| |
| size_type | push_back (const value_type &v) |
| | Copies an existing element to the end of the queue, overriding the first one when queue is out of space.
|
| |
| size_type | push_back (value_type &&v) |
| | Moves the element to the end of the queue, overriding the first one when queue is out of space.
|
| |
|
void | pop_back () |
| | Removes (dequeues) the last element of the queue.
|
| |
| size_type | push_front (const value_type &v) |
| | Copies an existing element to the head of the queue, overriding the last one when queue is out of space and moving all others one place right.
|
| |
| size_type | push_front (value_type &&v) |
| | Moves the element to the head of the queue, overriding the last one when queue is out of space and moving all others one place right.
|
| |
|
void | pop_front () |
| | Removes (dequeues) the head element of the queue.
|
| |
|
reference | front () |
| | Returns a reference to the head element in the queue.
|
| |
|
const_reference | front () const |
| | Returns a constant reference to the head element in the queue.
|
| |
|
reference | back () |
| | Returns a reference to the last element in the queue.
|
| |
|
const_reference | back () const |
| | Returns a constant reference to the last element in the queue.
|
| |
|
size_type | head () const |
| | Returns absolute subscript or position number of the head element in the queue. The element does not need to exist.
|
| |
|
size_type | tail () const |
| | Returns absolute subscript or position number of the last element in the queue. The element must exist.
|
| |
|
size_type | abs (size_type pos) const |
| | Returns absolute subscript or position number of the given element in the queue.
|
| |
template<class T>
class stdex::vector_queue< T >
Helper class to allow limited size FIFO queues implemented as vector of elements.