Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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 1494 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 value_type = _ValTrait::value_type
 
using reference = _ValTrait::reference
 
using pointer = _ValTrait::pointer
 

Public Member Functions

 IterExploreSource ()=default
 
void expandChildren ()
 
size_t depth () const
 
- 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)
 
 IterAdapter ()
 
 operator bool () const
 
reference operator* () const
 
pointer operator-> () const
 
IterAdapteroperator++ ()
 
bool isValid () const
 
bool empty () const
 
 ENABLE_USE_IN_STD_RANGE_FOR_LOOPS (IterAdapter)
 

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 = meta::RefTraits< DataHandle >::Reference
 
- Protected Member Functions inherited from IterAdapter< Pos, DataHandle >
bool check () const
 ask the controlling container if this position is valid.
 
void iterate ()
 ask the controlling container to yield the next position.
 
ConRef source ()
 allow derived classes to access backing container
 
const ConRef source () const
 
void resetPos (Pos otherPos)
 

Constructor & Destructor Documentation

◆ IterExploreSource() [1/2]

template<typename VAL >
IterExploreSource ( )
default

◆ IterExploreSource() [2/2]

template<typename VAL >
template<class IT >
IterExploreSource ( IT &&  opaqueSrcPipeline)
inlineprivate

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

Member Typedef Documentation

◆ Expandable

template<typename VAL >
using Expandable = iter_explorer::ChildExpandableSource<VAL>

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

Member Function Documentation

◆ expandChildren()

template<typename VAL >
void expandChildren ( )
inline

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

References IterExploreSource< VAL >::expandableSource(), ChildExpandableSource< VAL >::expandChildren(), and IterAdapter< Pos, DataHandle >::resetPos().

Referenced by IterExplorer_test::verify_asIterSource().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ depth()

template<typename VAL >
size_t depth ( ) const
inline

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

References ChildExpandableSource< VAL >::depth(), and IterExploreSource< VAL >::expandableSource().

+ Here is the call graph for this function:

◆ expandableSource()

template<typename VAL >
Expandable & expandableSource ( ) const
inlineprivate

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

Referenced by IterExploreSource< VAL >::depth(), and IterExploreSource< VAL >::expandChildren().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ IterExplorer

template<typename VAL >
template<class SRC >
friend class IterExplorer
friend

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

+ Inheritance diagram for IterExploreSource< VAL >:
+ Collaboration diagram for IterExploreSource< VAL >:

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