|
Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
|
A simplified version of the STL queue class. More...
#include <queue.h>

Public Member Functions | |
| int | size () const |
| return the number of elements currently in the queue | |
| bool | empty () const |
| return whether the queue is currently empty | |
| const T & | front () const |
| return const reference to the first element of the queue | |
| T & | front () |
| return live (non-const) reference to the first element of the queue | |
| const T & | back () const |
| return const reference to the last element of the queue | |
| T & | back () |
| return live (non-const) reference to the last element of the queue | |
| void | push (const T &elem) |
| add an element to the back of the queue | |
| void | pop () |
| remove the first element from the queue | |
A simplified version of the STL queue class.
|
inline |
return live (non-const) reference to the last element of the queue
|
inline |
return const reference to the last element of the queue
|
inline |
return whether the queue is currently empty
|
inline |
return live (non-const) reference to the first element of the queue
|
inline |
return const reference to the first element of the queue
|
inline |
remove the first element from the queue
|
inline |
add an element to the back of the queue
|
inline |
return the number of elements currently in the queue