Lumiera  0.pre.03
»edit your freedom«
IterZip_test Class Reference

Description

Test:
demonstrate construction and verify behaviour of a combined-iterator builder.
  • construction from arbitrary arguments by tuple-mapping a builder function
  • defining the operation on the product type by lifting individual operations
  • use the library building blocks to construct a zip-iter-builder
  • iterate a mix of source iterators and containers
  • apply additional processing logic by pipelining
    See also
    IterExplorer
    IterExplorer_test

Definition at line 82 of file iter-zip-test.cpp.

Private Member Functions

template<typename... ITS>
auto buildIterTuple (ITS &&...iters)
 
void demo_construction ()
 
void demo_mapToTuple ()
 
virtual void run (Arg)
 
void simpleUsage ()
 
void test_Fixture ()
 
void verify_exploration ()
 
void verify_iteration ()
 
void verify_pipelining ()
 
void verify_references ()
 

Member Function Documentation

◆ simpleUsage()

void simpleUsage ( )
inlineprivate
Test:
demonstrate combined iteration

Definition at line 102 of file iter-zip-test.cpp.

References lib::izip(), VERIFY_ERROR, and lib::zip().

+ Here is the call graph for this function:

◆ test_Fixture()

void test_Fixture ( )
inlineprivate
Test:
demonstrate how the test Fixture is used

Definition at line 126 of file iter-zip-test.cpp.

◆ demo_mapToTuple()

void demo_mapToTuple ( )
inlineprivate
Test:
demonstrate to apply a function to tuple contents

Definition at line 139 of file iter-zip-test.cpp.

References lib::explore().

+ Here is the call graph for this function:

◆ demo_construction()

void demo_construction ( )
inlineprivate
Test:
demonstrate how a tuple-zipping iterator can be constructed

Definition at line 190 of file iter-zip-test.cpp.

References lib::explore().

+ Here is the call graph for this function:

◆ verify_iteration()

void verify_iteration ( )
inlineprivate
Test:
create various product (tuple) iterators from mixed source iterators and verify basic iteration.

Definition at line 281 of file iter-zip-test.cpp.

◆ verify_references()

void verify_references ( )
inlineprivate
Test:
verify pass-through of references

Definition at line 368 of file iter-zip-test.cpp.

References lib::explore(), and lib::izip().

+ Here is the call graph for this function:

◆ verify_pipelining()

void verify_pipelining ( )
inlineprivate
Test:
the result is actually an IterExplorer pipeline builder, which can be used to attach further processing downstream.
Note
the design of IterExplorer inherently requires that generic lambdas accept the iterator type by reference; structural bindings can only be used in a second step.

Definition at line 409 of file iter-zip-test.cpp.

◆ verify_exploration()

void verify_exploration ( )
inlineprivate
Test:
verify the interplay of child expansion and tuple-zipping.
Remarks
the expansion mechanism implies that a child sequence is generated by an expand functor, based on the current iterator value at that point. The tricky part here is that this expand functor can sit somewhere in the source iterators, while the actual signal to expand is sent from »downstream« and has to be propagated to all children. Thus two expander-setups are demonstrated first, and then triggered from a combined iterator, dispatching the trigger over the tuple-zipping step.
  • the expansion-sequences unfold the same in each case
  • the shortest sequence terminates the overall zip()-evaluation
  • when generating the expandChildrem() call after the zip(), it is also passed to other iterators that have no expand-functor defined; for those, it is absorbed without effect. Now, since the expandAll() actually works by replacing the iterate() by expandChildern(), this means that the other sequences just do not make any progress.

Definition at line 468 of file iter-zip-test.cpp.

+ Inheritance diagram for IterZip_test:
+ Collaboration diagram for IterZip_test:

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