Lumiera  0.pre.03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 556 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 ( )
BaseAdapter ( SRC const &  src)

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

BaseAdapter ( SRC &&  src)

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

Member Function Documentation

void expandChildren ( )

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

size_t depth ( ) const

Definition at line 564 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: