A priority queue with an iterator. More...
#include <CPriorityQueue.h>
Public Types | |
typedef Container::value_type | value_type |
typedef Container::size_type | size_type |
typedef Container::iterator | iterator |
typedef Container::const_iterator | const_iterator |
typedef Container | container_type |
Public Member Functions | |
CPriorityQueue (Container &swappedIn) | |
manipulators | |
void | push (const value_type &v) |
Add element. | |
void | pop () |
Remove head element. | |
void | erase (iterator i) |
Erase element. | |
iterator | begin () |
Get start iterator. | |
iterator | end () |
Get end iterator. | |
void | swap (CPriorityQueue< T, Container, Compare > &q) |
Swap contents with another priority queue. | |
void | swap (Container &c2) |
Swap contents with another container. | |
accessors | |
bool | empty () const |
Returns true if there are no elements. | |
size_type | size () const |
Returns the number of elements. | |
const value_type & | top () const |
Returns the head element. | |
const_iterator | begin () const |
Get start iterator. | |
const_iterator | end () const |
Get end iterator. |
A priority queue with an iterator.
This priority queue is the same as a standard priority queue except: it sorts by std::greater, it has a forward iterator through the elements (which can appear in any order), and its contents can be swapped.
Definition at line 34 of file CPriorityQueue.h.