- 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.
|
typedef std::unordered_map< string, TimeVar > | HashMap |
|
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, TimeVar > | TreeMap |
|
typedef std::multimap< int, int > | TreeMultimap |
|
|
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 () |
|
◆ 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 |
The documentation for this class was generated from the following file: