SHORE API
|
Base class for data sources that support adding plugin objects. More...
Public Types | |
typedef plugin< T > | plugin_type |
Public Member Functions | |
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 | |
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... | |
Base class for data sources that support adding plugin objects.
|
inlineprotected |
Indicate that no more data will be added.
undo_last_push | The last buffer pushed could not be initialized, discard it. |
|
inlineprotected |
Exchange the last pushed buffer with an external one.
buf | Pointer to a T object allocated on the heap. |