Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
BaseAdapter< SRC > Struct Template Reference

#include "lib/iter-explorer.hpp"

Description

template<class SRC>
struct lib::iter_explorer::BaseAdapter< SRC >

Base of pipe processing decorator chain. IterExplorer allows to create a stack out of various decorating processors

  • each decorator is itself a _"state core"_, adding some on-demand processing
  • each wraps and adapts a source iterator, attaching to and passing-on the iteration logic Typically each such layer is configured with actual functionality provided as lambda or functor. Yet in addition to forming an iteration pipeline, there is kind of an internal interconnection protocol, allowing the layers to collaborate; notably this allows to handle an expandChildren() call, where some "expansion layer" consumes the current element and replaces it by an expanded series of new elements. Other layers might need to sync to this operation, and thus it is passed down the chain. For that reason, we need a dedicated BaseAdapter to adsorb such chained calls.
    Remarks
    when building the IterExplorer, the to-be-wrapped source is fed down into its place within BaseAdapter. For that reason, it is not sufficient just to lift the copy ctors of the base (as inheriting the base class ctors would do). Rather, we need dedicated further copy ctors to clone and move from the undecorated base type.

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

Public Types

using TAG_IterExplorer_BaseAdapter = SRC
 

Public Member Functions

 BaseAdapter ()=default
 
 BaseAdapter (SRC const &src)
 
 BaseAdapter (SRC &&src)
 
void expandChildren ()
 collaboration: recurse into nested scope
 
size_t depth () const
 collaboration: number of nested scopes
 

Constructor & Destructor Documentation

◆ BaseAdapter() [1/3]

template<class SRC >
BaseAdapter ( )
default

◆ BaseAdapter() [2/3]

template<class SRC >
BaseAdapter ( SRC const &  src)
inline

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

◆ BaseAdapter() [3/3]

template<class SRC >
BaseAdapter ( SRC &&  src)
inline

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

Member Typedef Documentation

◆ TAG_IterExplorer_BaseAdapter

template<class SRC >
using TAG_IterExplorer_BaseAdapter = SRC

for _BaseDetector

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

Member Function Documentation

◆ expandChildren()

template<class SRC >
void expandChildren ( )
inline

collaboration: recurse into nested scope

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

◆ depth()

template<class SRC >
size_t depth ( ) const
inline

collaboration: number of nested scopes

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

+ Inheritance diagram for BaseAdapter< SRC >:
+ Collaboration diagram for BaseAdapter< SRC >:

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