Lumiera  0.pre.03
»edit your freedom«
IterExploreSource< VAL > Struct Template Reference

#include "lib/iter-explorer.hpp"

Description

template<typename VAL>
struct lib::IterExploreSource< VAL >

Iterator front-end to manage and operate a IterExplorer pipeline opaquely.

In addition to the usual iterator functions, this front-end also exposes an expandChildren()-function, to activate the expansion functor installed through IterExplorer::expand().

Remarks
A iterator pipeline is assembled through invocation of the builder functions on IterExplorer — thereby creating a complex implementation defined iterator type. This front-end manages such a pipeline in heap allocated storage (by shared_ptr), while exposing only a simple conventional interface (templated to the resulting value type VAL). This allows to pass it over interfaces as "unspecified data source", without disclosing the details of the implementation.
Warning
this lightweight front-end handle in itself is copyable and default constructible, but any copies will hold onto the same implementation back-end. The effect of competing manipulations through such copies is undefined (it depends on arbitrary intrinsics of the implementation). Recommendation is, at any time, to use only one single instance for iteration and discard it when done.

Definition at line 1465 of file iter-explorer.hpp.

Public Types

using Expandable = iter_explorer::ChildExpandableSource< VAL >
 
- Public Types inherited from IterSource< TY >::iterator
using _I = IterAdapter< Pos, DataHandle >
 
- Public Types inherited from IterAdapter< Pos, DataHandle >
using pointer = typename _ValTrait::pointer
 
using reference = typename _ValTrait::reference
 
using value_type = typename _ValTrait::value_type
 

Public Member Functions

size_t depth () const
 
void expandChildren ()
 
- Public Member Functions inherited from IterSource< TY >::iterator
 operator string () const
 
- Public Member Functions inherited from IterAdapter< Pos, DataHandle >
 IterAdapter (DataHandle src, Pos const &startpos)
 
bool empty () const
 
 ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (IterAdapter)
 
bool isValid () const
 
 operator bool () const
 
reference operator* () const
 
IterAdapteroperator++ ()
 
pointer operator-> () const
 

Friends

template<class SRC >
class IterExplorer
 

Private Member Functions

template<class IT >
 IterExploreSource (IT &&opaqueSrcPipeline)
 
ExpandableexpandableSource () const
 

Additional Inherited Members

- Protected Types inherited from IterAdapter< Pos, DataHandle >
using ConRef = typename meta::RefTraits< DataHandle >::Reference
 
- Protected Member Functions inherited from IterAdapter< Pos, DataHandle >
bool check () const
 ask the controlling container if this position is valid. More...
 
void iterate ()
 ask the controlling container to yield the next position. More...
 
void resetPos (Pos otherPos)
 
ConRef source ()
 allow derived classes to access backing container
 
const ConRef source () const
 
+ Inheritance diagram for IterExploreSource< VAL >:
+ Collaboration diagram for IterExploreSource< VAL >:

The documentation for this struct was generated from the following file: