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

Description

Test:
create some (opaque) data sources, and then pull the data out by iteration.

Demonstrates simple usage of the IterSource interface

See also
IterSource
PlacementIndex::Table::_eachEntry_4check real world usage example
Todo:
the output order of the values produced by this test is implementation dependent in for the hashmap case

Definition at line 155 of file iter-source-test.cpp.

Private Types

typedef std::unordered_map< string, TimeVarHashMap
 
typedef std::unordered_multimap< int, int > HashMultimap
 
typedef IterSource< int >::iterator IntIter
 
typedef IterSource< string >::iterator StringIter
 
typedef IterSource< CStr >::iterator StrIter
 
typedef IterSource< TimeVar >::iterator TimeIter
 
typedef std::map< string, TimeVarTreeMap
 
typedef std::multimap< int, int > TreeMultimap
 

Private Member Functions

virtual void run (Arg arg)
 
template<class MAP >
void verify_MapWrappers ()
 
template<class MAP >
void verify_MultimapIters ()
 
void verify_simpleIters ()
 
void verify_singleValIter ()
 
void verify_transformIter ()
 

Private Attributes

uint NUM_ELMS {0}
 

Member Function Documentation

◆ verify_transformIter()

void verify_transformIter ( )
inlineprivate
Test:
verify transforming an embedded iterator This test not only wraps a source iterator and packages it behind the abstracting interface IterSource, but in addition also applies a function to each element yielded by the source iterator.

As demo transformation we use the values from our custom container (WrappedList) to build a time value in quarter seconds

Definition at line 224 of file iter-source-test.cpp.

◆ verify_singleValIter()

void verify_singleValIter ( )
inlineprivate
Test:
an IterSouce which returns just a single value once

Definition at line 244 of file iter-source-test.cpp.

+ Inheritance diagram for IterSource_test:
+ Collaboration diagram for IterSource_test:

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