Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Expander< SRC, FUN > Class Template Reference

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

Description

template<class SRC, class FUN>
class lib::iter_explorer::Expander< SRC, FUN >

Decorator for TreeExplorer adding the ability to "expand children". The expandChildren() operation is the key element of a depth-first evaluation: it consumes one element and performs a preconfigured expansion functor on that element to yield its "children". These are given in the form of another iterator, which needs to be compatible to the source iterator ("compatibility" boils down to both iterators yielding a compatible value type). Now, this sequence of children effectively replaces the expanded source element in the overall resulting sequence; which means, the nested sequence was flattened into the results. Since this expand() operation can again invoked on the results, the implementation of such an evaluation requires a stack datastructure, so the nested iterator from each expand() invocation can be pushed to become the new active source for iteration. Thus the primary purpose of this Expander (decorator) is to integrate those "nested child iterators" seamlessly into the overall iteration process; once a child iterator is exhausted, it will be popped and iteration continues with the previous child iterator or finally with the source iterator wrapped by this decorator.

Remarks
since we allow a lot of leeway regarding the actual form and definition of the expansion functor, there is a lot of minute technical details, mostly confined within the _BoundFunctorTraits.
Template Parameters
SRCthe wrapped source iterator, typically a TreeExplorer or nested decorator.
FUNthe concrete type of the functor passed. Will be dissected to find the signature

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

+ Inheritance diagram for Expander< SRC, FUN >:
+ Collaboration diagram for Expander< SRC, FUN >:

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