SHORE API
|
Turns a data source without an internal buffer into one with an internal buffer. More...
Public Types | |
typedef S | source_type |
typedef T | current_type |
typedef Cmp | compare_type |
![]() | |
typedef plugin< T > | plugin_type |
Public Member Functions | |
monolithic (Cmp cmp=Cmp()) | |
Initialize, optionally with a comparator. | |
template<typename Arg > | |
monolithic (Arg a1, Cmp cmp=Cmp()) | |
Initialize with a single argument to the wrapped type, and optionally with a comparator. | |
template<typename Arg1 , typename Arg2 > | |
monolithic (Arg1 a1, Arg2 a2, Cmp cmp=Cmp()) | |
Initialize with two arguments to the wrapped type, and optionally with a comparator. | |
source_type & | basic () |
Get the wrapped data source object ("basic" interface). | |
const source_type & | basic () const |
Get the wrapped data source object ("basic" interface). | |
const current_type & | current () const |
Get the current dataset element. | |
bool | has_data () |
Initialize / check for data availability. | |
void | next () |
Discard the current dataset element. | |
![]() | |
buffer_chain () | |
Constructor - initialize empty buffer chain. | |
~buffer_chain () | |
Destructor - free all buffers. | |
void | add_plugin (plugin_type *const p) |
Add a plugin object. | |
void | clear_plugins () |
Remove all plugin objects. | |
Protected Member Functions | |
Cmp | get_comparator () const |
Get the comparator for the current ordering check. | |
![]() | |
bool | buffer_chain_ready () const |
Check if there is an element ready to be retrieved. | |
T & | buffer_chain_push () |
Get an empty buffer. | |
bool | buffer_chain_prepare () |
Apply plugins after having initialized a new buffer. | |
bool | buffer_chain_flush (const bool undo_last_push) |
Indicate that no more data will be added. More... | |
const T & | buffer_chain_front () const |
Get the contents of the first buffer. | |
bool | buffer_chain_waiting () const |
Check that the buffer chain is neither ready nor flushed. | |
bool | buffer_chain_pop () |
Discard the buffer holding the first element. | |
void | buffer_chain_reset () |
Clear all data and reset the state of the buffer chain. | |
T * | buffer_chain_swap (T *buf) |
Exchange the last pushed buffer with an external one. More... | |
Turns a data source without an internal buffer into one with an internal buffer.
bool next(T &) —> bool has_data() / const T ¤t() / void next()