|
| Queue () |
| Constructs an empty queue.
|
|
| Queue (const Queue< E > &Q) |
| Constructs a queue that is a copy of Q .
|
|
| Queue (Queue< E > &&Q) |
| Constructs a queue containing the elements of Q (move semantics).
|
|
| Queue (std::initializer_list< E > initList) |
| Constructs a queue and appends the elements in initList to it.
|
|
| ~Queue () |
| Destruction.
|
|
|
These methods provide simple access without changing the list.
|
bool | empty () const |
| Returns true iff the queue is empty.
|
|
int | size () const |
| Returns the number of elements in the queue.
|
|
const_reference | top () const |
| Returns a reference to the front element.
|
|
reference | top () |
| Returns a reference to the front element.
|
|
const_reference | bottom () const |
| Returns a reference to the back element.
|
|
reference | bottom () |
| Returns a reference to the back element.
|
|
|
These methods return forward iterators to elements in the queue.
|
iterator | begin () |
| Returns an iterator to the first element of the queue.
|
|
const_iterator | begin () const |
| Returns a const iterator to the first element of the queue.
|
|
const_iterator | cbegin () const |
| Returns a const iterator to the first element of the queue.
|
|
iterator | end () |
| Returns an iterator to one-past-last element of the queue.
|
|
const_iterator | end () const |
| Returns a const iterator to one-past-last element of the queue.
|
|
const_iterator | cend () const |
| Returns a const iterator to one-past-last element of the queue.
|
|
iterator | backIterator () |
| Returns an iterator to the last element of the queue.
|
|
const_iterator | backIterator () const |
| Returns a const iterator to the last element of the queue.
|
|
|
The following operators are provided by lists.
|
Queue< E > & | operator= (const Queue< E > &Q) |
| Assignment operator.
|
|
Queue< E > & | operator= (Queue< E > &&Q) |
| Assignment operator (move semantics).
|
|
const SList< E > & | getList () const |
| Conversion to const SList.
|
|
|
These method add elements to the list and remove elements from the list.
|
iterator | append (const E &x) |
| Adds x at the end of queue.
|
|
template<class... Args> |
iterator | emplace (Args &&... args) |
| Adds a new element at the end of the queue.
|
|
E | pop () |
| Removes front element and returns it.
|
|
void | clear () |
| Makes the queue empty.
|
|
|
| SList () |
| Constructs an empty singly linked list.
|
|
| SList (const SList< E > &L) |
| Constructs a singly linked list that is a copy of L .
|
|
| SList (SList< E > &&L) noexcept |
| Constructs a singly linked list containing the elements of L (move semantics).
|
|
| SList (std::initializer_list< E > init) |
| Constructs a singly linked list containing the elements in init .
|
|
int | size () const |
| Returns the number of elements in the list.
|
|
const SListPure< E > & | getSListPure () const |
| Conversion to const SListPure.
|
|
SList< E > & | operator= (const SList< E > &L) |
| Assignment operator.
|
|
SList< E > & | operator= (SList< E > &&L) |
| Assignment operator (move semantics).
|
|
bool | operator== (const SList< E > &L) const |
| Equality operator.
|
|
bool | operator!= (const SList< E > &L) const |
| Inequality operator.
|
|
SListIterator< E > | pushFront (const E &x) |
| Adds element x at the beginning of the list.
|
|
template<class... Args> |
iterator | emplaceFront (Args &&... args) |
| Adds a new element at the beginning of the list.
|
|
SListIterator< E > | pushBack (const E &x) |
| Adds element x at the end of the list.
|
|
template<class... Args> |
iterator | emplaceBack (Args &&... args) |
| Adds a new element at the end of the list.
|
|
SListIterator< E > | insertAfter (const E &x, SListIterator< E > itBefore) |
| Inserts element x after itBefore .
|
|
void | popFront () |
| Removes the first element from the list.
|
|
E | popFrontRet () |
| Removes the first element from the list and returns it.
|
|
void | delSucc (SListIterator< E > itBefore) |
| Removes the succesor of itBefore .
|
|
void | clear () |
| Removes all elements from the list.
|
|
void | moveFrontToFront (SList< E > &L2) |
| Moves the first element of this list to the begin of list L2 .
|
|
void | moveFrontToBack (SList< E > &L2) |
| Moves the first element of this list to the end of list L2 .
|
|
void | moveFrontToSucc (SList< E > &L2, SListIterator< E > itBefore) |
| Moves the first element of this list to list L2 inserted after itBefore .
|
|
void | conc (SList< E > &L2) |
| Appends L2 to this list and makes L2 empty.
|
|
template<class E>
class ogdf::Queue< E >
The parameterized class Queue<E> implements list-based queues.
In contrast to QueuePure<E>, instances of Queue<E> store the number of elements contained in the queue.
- Template Parameters
-
Definition at line 205 of file Queue.h.