The data_iterable manages streaming data from an NDS::connection.
More...
#include <nds_data_iterator.hh>
The data_iterable manages streaming data from an NDS::connection.
This class manages a single stream of data by providing a set of input iterators which represent the data stream.
- Note
- All data from a iteration must be consumed before the underlying connection is available for additional commands.
-
Due to the demands of iterators, and to keep the number of times buffers are copied, the iteration is done in terms of std::shared_ptr<NDS::buffers_type>. As such the current value is tracked by the data_iterable object and by the iterators. It is important to complete the iteration, and allow the iterators to go out of scope (or be assigned to the end() value) to allow the internal buffers to be released.
-
The iteration is done when begin() == end().
NDS::abi_0::data_iterable::data_iterable |
( |
const data_iterable & |
other | ) |
|
|
default |
Copy constructor.
A data_iterable may safely be copied. Copied objects refer to the same iteration and share state.
- Parameters
-
NDS::abi_0::data_iterable::data_iterable |
( |
data_iterable && |
other | ) |
|
|
defaultnoexcept |
Move constructor.
A data_iterable may safely be moved.
- Parameters
-
- Note
- after a move other is defined as refering to a completed iteration.
void NDS::abi_0::data_iterable::abort |
( |
| ) |
|
Abort an on-going iteration and close the underlying connection.
- Note
- As this closes the underlying connection, a new connection object must be used to do any further work after aborting an iteration.
Return the current start tof the iteration.
- Returns
- An iterator_type object referencing the current state of the iteration.
- Note
- When an iterator is advanced, it updates the shared state of the iteration, and has the side effect of moving where begin references.
-
the returned iterator satisfies the requirements of an InputIterator
Return a end/sentinal iterator.
- Returns
- An iterator_type object referencing the end state of the iteration.
- Note
- the returned iterator satisfies the requirements of an InputIterator
Copy assignment operator.
A data_iterable may safely be copied. Copied objects refer to the same iteration and share state.
- Parameters
-
- Returns
- A reference to *this
Move assigment operator.
A data_iterable may safely be moved.
- Parameters
-
- Note
- after a move other is defined as refering to a completed iteration.
The documentation for this class was generated from the following files: