Lumiera  0.pre.03
BaseAdapter< SRC > Struct Template Reference

#include "lib/iter-tree-explorer.hpp"


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

Base of pipe processing decorator chain. TreeExplorer 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.
    when building the TreeExplorer, the to-be-wrapped source is fed down into its place within BaseAdapter. For that reason, we need to lift the copy ctors of the base. Just inheriting the base class ctors won't do that, at least not in C++14.

Definition at line 584 of file iter-tree-explorer.hpp.

Public Member Functions

 BaseAdapter ()=default
 BaseAdapter (SRC const &src)
 BaseAdapter (SRC &&src)
size_t depth () const
void expandChildren ()

Constructor & Destructor Documentation

◆ BaseAdapter() [1/3]

BaseAdapter ( )

◆ BaseAdapter() [2/3]

BaseAdapter ( SRC const &  src)

Definition at line 588 of file iter-tree-explorer.hpp.

◆ BaseAdapter() [3/3]

BaseAdapter ( SRC &&  src)

Definition at line 589 of file iter-tree-explorer.hpp.

Member Function Documentation

◆ expandChildren()

void expandChildren ( )

Definition at line 591 of file iter-tree-explorer.hpp.

◆ depth()

size_t depth ( ) const

Definition at line 592 of file iter-tree-explorer.hpp.

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

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