![]() |
Deskflow 1.24.0.365
Keyboard and mouse sharing utility
|
A priority queue with an iterator. More...
#include <PriorityQueue.h>
Public Types | |
| using | value_type = Container::value_type |
| using | size_type = Container::size_type |
| using | iterator = Container::iterator |
| using | const_iterator = Container::const_iterator |
| using | container_type = Container |
Public Member Functions | |
| PriorityQueue ()=default | |
| PriorityQueue (Container &swappedIn) | |
| ~PriorityQueue ()=default | |
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 (PriorityQueue< T, Container, Compare > &q) noexcept |
| Swap contents with another priority queue. | |
| void | swap (Container &c2) noexcept |
| 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.
| using PriorityQueue< T, Container, Compare >::const_iterator = Container::const_iterator |
| using PriorityQueue< T, Container, Compare >::container_type = Container |
| using PriorityQueue< T, Container, Compare >::iterator = Container::iterator |
| using PriorityQueue< T, Container, Compare >::size_type = Container::size_type |
| using PriorityQueue< T, Container, Compare >::value_type = Container::value_type |
|
default |
|
inlineexplicit |
|
default |
|
inline |
Get start iterator.
|
inline |
Get start iterator.
|
inline |
Returns true if there are no elements.
|
inline |
Get end iterator.
|
inline |
Get end iterator.
|
inline |
Erase element.
|
inline |
Remove head element.
|
inline |
Add element.
|
inline |
Returns the number of elements.
|
inlinenoexcept |
Swap contents with another container.
|
inlinenoexcept |
Swap contents with another priority queue.
|
inline |
Returns the head element.