Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/iter-source.hpp"
Iteration source interface to abstract a data source, which then can be accessed through IterAdapter as a frontend, allowing to pull individual elements until exhaustion.
This base class is empty and makes no assumptions regarding identity, instantiation and copying.
Definition at line 88 of file iter-source.hpp.
Public Types | |
using | pointer = TY * |
using | reference = TY & |
using | value_type = TY |
Public Member Functions | |
virtual | operator string () const |
is ABC More... | |
Static Public Member Functions | |
static iterator | build (IterSource &sourceImpl) |
build an iterator frontend for the given source, More... | |
static iterator | build (IterSource *sourceImplObject) |
build an iterator frontend, thereby managing the given heap allocated source object instance. More... | |
Static Public Attributes | |
static iterator | EMPTY_SOURCE = iterator() |
storage for the empty data-source constant | |
Classes | |
struct | iterator |
Friends | |
bool | checkPoint (DataHandle const &, Pos const &pos) |
void | iterNext (DataHandle &source, Pos &pos) |
Protected Types | |
typedef shared_ptr< IterSource > | DataHandle |
typedef TY * | Pos |
Protected Member Functions | |
virtual void | disconnect () |
disconnect the data source / iteration frontend. More... | |
virtual Pos | firstResult ()=0 |
iteration start: prepare the first element. More... | |
virtual void | nextResult (Pos &pos)=0 |
iteration step: switch on to the next element. More... | |
Static Private Member Functions | |
static void | destroy_managed_source (IterSource *source) |
static void | detach_without_destroy (IterSource *source) |
static iterator | startIteration (DataHandle sourceHandle) |
|
protectedpure virtual |
iteration start: prepare the first element.
may return NULL in case of empty data source
Implemented in DiagnosticOutputSlot::OutputFramesLog, NummyGenerator, and TestSource.
|
protectedpure virtual |
iteration step: switch on to the next element.
The pos pointer should be set to NULL to report iteration end
Implemented in DiagnosticOutputSlot::OutputFramesLog, NummyGenerator, and TestSource.
|
inlineprotectedvirtual |
disconnect the data source / iteration frontend.
Depending on the way the IterSource got created this might (or might not) be followed by destroying the data source.
Definition at line 114 of file iter-source.hpp.
|
inlinevirtual |
|
inlinestatic |
build an iterator frontend for the given source,
Definition at line 160 of file iter-source.hpp.
Referenced by lib::iter_source::eachEntry(), MutationMessage::MutationMessage(), lib::iter_source::singleVal(), lib::iter_source::transform(), and lib::iter_source::wrapIter().
|
inlinestatic |
build an iterator frontend, thereby managing the given heap allocated source object instance.
Definition at line 173 of file iter-source.hpp.