The parameterized class BoundedQueue<E> implements queues with bounded size. More...
#include <ogdf/basic/BoundedQueue.h>
Public Member Functions | |
| BoundedQueue (INDEX n) | |
| Pointer to first element of total array. | |
| BoundedQueue (const BoundedQueue< E > &Q) | |
| Constructs a bounded queue that is a copy of Q. | |
| ~BoundedQueue () | |
| const E & | top () const |
| Returns front element. | |
| E & | top () |
| Returns front element. | |
| const E & | bottom () const |
| Returns back element. | |
| E & | bottom () |
| Returns back element. | |
| INDEX | size () const |
| Returns current size of the queue. | |
| INDEX | capacity () const |
| Returns the capacity of the bounded queue. | |
| bool | empty () |
| Returns true iff the queue is empty. | |
| bool | full () |
| Returns true iff the queue is full. | |
| BoundedQueue< E > & | operator= (const BoundedQueue< E > &Q) |
| Assignment operator. | |
| void | append (const E &x) |
| Adds x at the end of queue. | |
| E | pop () |
| Removes front element and returns it. | |
| void | clear () |
| Makes the queue empty. | |
| void | print (ostream &os, char delim= ' ') const |
| Prints the queue to output stream os. | |
Private Member Functions | |
| void | copy (const BoundedQueue< E > &Q) |
Private Attributes | |
| E * | m_pStart |
| E * | m_pEnd |
| Pointer to first element of current sequence. | |
| E * | m_pStop |
| Pointer to one past last element of current sequence. | |
| E * | m_pFirst |
| Pointer to one past last element of total array. | |
The parameterized class BoundedQueue<E> implements queues with bounded size.
Definition at line 73 of file BoundedQueue.h.
| ogdf::BoundedQueue< E, INDEX >::BoundedQueue | ( | INDEX | n | ) | [inline, explicit] |
Pointer to first element of total array.
Constructs an empty bounded queue for at most n elements.
Definition at line 82 of file BoundedQueue.h.
| ogdf::BoundedQueue< E, INDEX >::BoundedQueue | ( | const BoundedQueue< E > & | Q | ) | [inline] |
Constructs a bounded queue that is a copy of Q.
Definition at line 91 of file BoundedQueue.h.
| ogdf::BoundedQueue< E, INDEX >::~BoundedQueue | ( | ) | [inline] |
Definition at line 96 of file BoundedQueue.h.
| void ogdf::BoundedQueue< E, INDEX >::append | ( | const E & | x | ) | [inline] |
Adds x at the end of queue.
Definition at line 153 of file BoundedQueue.h.
| const E& ogdf::BoundedQueue< E, INDEX >::bottom | ( | ) | const [inline] |
Returns back element.
Definition at line 111 of file BoundedQueue.h.
| E& ogdf::BoundedQueue< E, INDEX >::bottom | ( | ) | [inline] |
Returns back element.
Definition at line 118 of file BoundedQueue.h.
| INDEX ogdf::BoundedQueue< E, INDEX >::capacity | ( | ) | const [inline] |
Returns the capacity of the bounded queue.
Definition at line 132 of file BoundedQueue.h.
| void ogdf::BoundedQueue< E, INDEX >::clear | ( | ) | [inline] |
Makes the queue empty.
Definition at line 168 of file BoundedQueue.h.
| void ogdf::BoundedQueue< E, INDEX >::copy | ( | const BoundedQueue< E > & | Q | ) | [inline, private] |
Definition at line 181 of file BoundedQueue.h.
| bool ogdf::BoundedQueue< E, INDEX >::empty | ( | ) | [inline] |
Returns true iff the queue is empty.
Definition at line 135 of file BoundedQueue.h.
| bool ogdf::BoundedQueue< E, INDEX >::full | ( | ) | [inline] |
Returns true iff the queue is full.
Definition at line 138 of file BoundedQueue.h.
| BoundedQueue<E>& ogdf::BoundedQueue< E, INDEX >::operator= | ( | const BoundedQueue< E > & | Q | ) | [inline] |
Assignment operator.
Definition at line 146 of file BoundedQueue.h.
| E ogdf::BoundedQueue< E, INDEX >::pop | ( | ) | [inline] |
Removes front element and returns it.
Definition at line 160 of file BoundedQueue.h.
| void ogdf::BoundedQueue< E, INDEX >::print | ( | ostream & | os, | |
| char | delim = ' ' | |||
| ) | const [inline] |
Prints the queue to output stream os.
Definition at line 171 of file BoundedQueue.h.
| INDEX ogdf::BoundedQueue< E, INDEX >::size | ( | ) | const [inline] |
Returns current size of the queue.
Definition at line 125 of file BoundedQueue.h.
| const E& ogdf::BoundedQueue< E, INDEX >::top | ( | ) | const [inline] |
Returns front element.
Definition at line 99 of file BoundedQueue.h.
| E& ogdf::BoundedQueue< E, INDEX >::top | ( | ) | [inline] |
Returns front element.
Definition at line 105 of file BoundedQueue.h.
E* ogdf::BoundedQueue< E, INDEX >::m_pEnd [private] |
Pointer to first element of current sequence.
Definition at line 76 of file BoundedQueue.h.
E* ogdf::BoundedQueue< E, INDEX >::m_pFirst [private] |
Pointer to one past last element of total array.
Definition at line 78 of file BoundedQueue.h.
E* ogdf::BoundedQueue< E, INDEX >::m_pStart [private] |
Definition at line 75 of file BoundedQueue.h.
E* ogdf::BoundedQueue< E, INDEX >::m_pStop [private] |
Pointer to one past last element of current sequence.
Definition at line 77 of file BoundedQueue.h.