yat
0.20.3pre
|
#include <yat/utility/SortedBuffer.h>
Public Member Functions | |
SortedBuffer (OutputIterator out) | |
SortedBuffer (OutputIterator out, const Comp &comp) | |
virtual | ~SortedBuffer (void) |
Destructor. More... | |
void | flush (void) |
void | flush_all (void) |
void | flush (const T &t) |
void | push (const T &t) |
void | push (T &&t) |
const T & | top (void) const |
SortedBuffer is similar to a priority queue. Elements are pushed into the container and flushed to an output iterator in a sorted manner. Ny default elements are sorted using std::less such that the smallest element is flushed first, but this can be modified using a different functor.
|
inline |
out | iterator that elements are copied to |
|
inline |
out | Iterator that elements are copied to |
comp | Comparator used to sort elements |
|
inlinevirtual |
Destructor.
Flush all elements to output iterator
|
inline |
Flush one element to output iterator
|
inline |
Flush all elements that are less than t
.
|
inline |
Copy elements in a sorted fashion to the output iterator.
|
inline |
Insert an element to the buffer
|
inline |
Move an element into the buffer
|
inline |