Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
IterAdapterSTL_test Class Reference

Description

Test:
verify some of the adapters to expose typical container usage patterns as Lumiera Forward Iterators.
  • distinct values from a sequence
  • keys and values of a map / multimap
  • distinct keys from a multimap
  • multimap values associated with a given key
  • snapshot of an iterator, to be retrieved as iterator
See also
RangeIter
iter-adapter.hpp
iter-adapter-stl.hpp
Todo:
this test just pulls all the values from the iterator and the testsuite verifies the retrieved values. But for the hash-map, the order of the results is not guaranteed, and implementation dependent.

Definition at line 77 of file iter-adapter-stl-test.cpp.

Private Member Functions

virtual void run (Arg arg)
 
template<class MAP >
void iterateMapKeyVal (MAP const &map)
 
template<class MMAP >
void iterateValues4Key (MMAP const &mumap)
 
void checkDistinctValIter ()
 
void checkIteratorSnapshot ()
 
template<class IT >
uint sumAll (IT &it)
 

Private Attributes

uint NUM_ELMS {0}
 

Member Function Documentation

◆ run()

virtual void run ( Arg  arg)
inlineprivatevirtual

Definition at line 82 of file iter-adapter-stl-test.cpp.

References IterAdapterSTL_test::checkDistinctValIter(), IterAdapterSTL_test::checkIteratorSnapshot(), IterAdapterSTL_test::iterateMapKeyVal(), IterAdapterSTL_test::iterateValues4Key(), and IterAdapterSTL_test::NUM_ELMS.

+ Here is the call graph for this function:

◆ iterateMapKeyVal()

template<class MAP >
void iterateMapKeyVal ( MAP const &  map)
inlineprivate

Definition at line 103 of file iter-adapter-stl-test.cpp.

References lib::iter_stl::eachDistinctKey(), lib::iter_stl::eachKey(), lib::iter_stl::eachVal(), IterAdapterSTL_test::iterateMapKeyVal(), PRINT_FUNC, and TEST_ITER.

Referenced by IterAdapterSTL_test::iterateMapKeyVal(), and IterAdapterSTL_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ iterateValues4Key()

template<class MMAP >
void iterateValues4Key ( MMAP const &  mumap)
inlineprivate

Definition at line 117 of file iter-adapter-stl-test.cpp.

References lib::iter_stl::eachValForKey(), IterAdapterSTL_test::iterateValues4Key(), IterAdapterSTL_test::NUM_ELMS, PRINT_FUNC, and TEST_ITER.

Referenced by IterAdapterSTL_test::iterateValues4Key(), and IterAdapterSTL_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkDistinctValIter()

void checkDistinctValIter ( )
inlineprivate

Definition at line 129 of file iter-adapter-stl-test.cpp.

References lib::iter_stl::eachDistinct(), PRINT_FUNC, and TEST_ITER.

Referenced by IterAdapterSTL_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkIteratorSnapshot()

void checkIteratorSnapshot ( )
inlineprivate

Definition at line 157 of file iter-adapter-stl-test.cpp.

References IterAdapterSTL_test::NUM_ELMS, lib::iter_stl::snapshot(), and IterAdapterSTL_test::sumAll().

Referenced by IterAdapterSTL_test::run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sumAll()

template<class IT >
uint sumAll ( IT &  it)
inlineprivate

Definition at line 217 of file iter-adapter-stl-test.cpp.

Referenced by IterAdapterSTL_test::checkIteratorSnapshot().

+ Here is the caller graph for this function:

Member Data Documentation

◆ NUM_ELMS

+ Inheritance diagram for IterAdapterSTL_test:
+ Collaboration diagram for IterAdapterSTL_test:

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