Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lib::iter_stl Namespace Reference

Classes

class  DistinctIter
 Helper to filter repeated values from a wrapped iterator (both STL or Lumiera) More...
 
class  IterSnapshot
 materialised iterator contents. More...
 
struct  Wrapped_Identity
 Wrapped-Iter-Policy: forwarding directly with typing retained unaltered. More...
 
struct  Wrapped_PickConstVal
 
struct  Wrapped_PickKey
 Wrapped-Iter-Policy: picking the key part of a pair iterator (map or multimap). More...
 
struct  Wrapped_PickVal
 Wrapped-Iter-Policy: picking the value part of a pair iterator (map or multimap). More...
 
struct  WrappedStlIter
 helper baseclass to simplify defining customised wrapped STL iterators More...
 

Functions

template<class CON >
_SeqT< CON >::Addrs eachAddress (CON &coll)
 
template<class SEQ >
_SeqT< SEQ >::DistinctVals eachDistinct (SEQ &seq)
 build a Lumiera Forward Iterator to suppress any repetitions in the given sequence. More...
 
template<class MAP >
_MapT< MAP >::DistinctKeys eachDistinctKey (MAP &map)
 
template<class CON >
_SeqT< CON >::Range eachElm (CON &coll)
 
template<class MAP >
_MapT< MAP >::KeyIter eachKey (MAP &map)
 
template<class IT >
_MapIterT< IT >::KeyIter eachKey (IT const &begin, IT const &end)
 
template<class MAP >
_MapT< MAP >::ValIter eachVal (MAP &map)
 
template<class IT >
_MapIterT< IT >::ValIter eachVal (IT const &begin, IT const &end)
 
template<class MMAP , typename KEY >
_MapT< MMAP >::ValIter eachValForKey (MMAP &multimap, KEY key)
 
template<class CON >
ContentSnapshot< CON > snapshot (CON const &con)
 Take a snapshot of the given STL compliant container. More...
 
template<class VAL >
iter_stl::IterSnapshot< VAL > snapshot (std::initializer_list< VAL > const &&ili)
 Take a snapshot of the given std::initializer_list. More...
 

Function Documentation

_SeqT<CON>::Range lib::iter_stl::eachElm ( CON &  coll)
inline
Returns
Lumiera Forward Iterator to yield each Element from a STL container

Definition at line 289 of file iter-adapter-stl.hpp.

Referenced by Index< POA >::Cluster::allElms(), Record< VAL >::attribs(), TestMutationTarget::begin(), FormatHelper_test::checkStringJoin(), eachAddress(), OutputSlotImplBase::ConnectionManager< CON >::getOpenedSinks(), TestMutationTarget::locate(), TreeMutatorBinding_test::mutateCollection(), Record< VAL >::scope(), TestMutationTarget::showSrcBuffer(), TestMutationTarget::srcIter(), and IterExplorer_test::verifyRawChainedIterators().

+ Here is the caller graph for this function:

_SeqT<CON>::Addrs lib::iter_stl::eachAddress ( CON &  coll)
inline
Returns
Lumiera Forward Iterator exposing the address of each Element within a STL

Definition at line 301 of file iter-adapter-stl.hpp.

References eachElm().

Referenced by HierarchyOrientationIndicator_test::demonstrate_tree_rebuilding().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

_MapT<MAP>::KeyIter lib::iter_stl::eachKey ( MAP &  map)
inline
Returns
Lumiera Forward Iterator to yield each key of a map/multimap

Definition at line 313 of file iter-adapter-stl.hpp.

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

+ Here is the caller graph for this function:

_MapIterT<IT>::KeyIter lib::iter_stl::eachKey ( IT const &  begin,
IT const &  end 
)
inline
Returns
Lumiera Forward Iterator extracting the keys from a given range of (key,value) pairs

Definition at line 327 of file iter-adapter-stl.hpp.

_MapT<MAP>::ValIter lib::iter_stl::eachVal ( MAP &  map)
inline
Returns
Lumiera Forward Iterator to yield each value within a map/multimap

Definition at line 341 of file iter-adapter-stl.hpp.

Referenced by IterAdapterSTL_test::iterateMapKeyVal(), Index< POA >::provision_count(), PlacementIndex::Table::remove_all_from_scope(), and Index< POA >::request_count().

+ Here is the caller graph for this function:

_MapIterT<IT>::ValIter lib::iter_stl::eachVal ( IT const &  begin,
IT const &  end 
)
inline
Returns
Lumiera Forward Iterator extracting the values from a given range of (key,value) pairs

Definition at line 355 of file iter-adapter-stl.hpp.

_SeqT<SEQ>::DistinctVals lib::iter_stl::eachDistinct ( SEQ &  seq)
inline

build a Lumiera Forward Iterator to suppress any repetitions in the given sequence.

Definition at line 369 of file iter-adapter-stl.hpp.

Referenced by IterAdapterSTL_test::checkDistinctValIter().

+ Here is the caller graph for this function:

_MapT<MAP>::DistinctKeys lib::iter_stl::eachDistinctKey ( MAP &  map)
inline
Returns
Lumiera Forward Iterator to yield the distinct keys from a multimap
Warning
full scan of all keys, dropping repetitions

Definition at line 384 of file iter-adapter-stl.hpp.

References eachKey().

Referenced by PlacementIndex::Table::_eachScope_4check(), IterAdapterSTL_test::iterateMapKeyVal(), and IterSource_test::verify_MultimapIters().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

_MapT<MMAP>::ValIter lib::iter_stl::eachValForKey ( MMAP &  multimap,
KEY  key 
)
inline
Returns
Lumiera Forward Iterator to yield the distinct keys from a multimap
Warning
full scan of all keys, dropping repetitions

Definition at line 396 of file iter-adapter-stl.hpp.

Referenced by PlacementIndex::Table::_contents_4check(), IterAdapterSTL_test::iterateValues4Key(), IterSource_test::verify_MapWrappers(), and IterSource_test::verify_MultimapIters().

+ Here is the caller graph for this function:

ContentSnapshot<CON> lib::iter_stl::snapshot ( CON const &  con)
inline

Take a snapshot of the given STL compliant container.

Returns
Lumiera Forward Iterator to yield each Element from this snapshot
Note
the snapshot is stored within a vector, i.e. heap allocated.
Warning
copying the returned iterator object copies the snapshot vector

Definition at line 543 of file iter-adapter-stl.hpp.

Referenced by DiffDetector< SEQ >::isChanged(), AbstractTangible_test::mutate(), DiffTreeApplication_test::mutationDiff(), DiffComplexApplication_test::mutationDiff(), DiffTreeApplication_test::populationDiff(), DiffComplexApplication_test::populationDiff(), and DiffComplexApplication_test::reorderingDiff().

+ Here is the caller graph for this function:

iter_stl::IterSnapshot<VAL> lib::iter_stl::snapshot ( std::initializer_list< VAL > const &&  ili)
inline

Take a snapshot of the given std::initializer_list.

Returns
Lumiera Forward Iterator to yield each Element from this snapshot
Remarks
this can be a easy workaround for passing on a sequence of literal values defined inline in a brace expression; the typical implementation of brace initialiser lists allocates a temporary array on the stack. By using this helper, we copy the elements from this local array into a vector on the heap. Of course this isn't efficient, but it's convenient, e.g. for testing.

Definition at line 559 of file iter-adapter-stl.hpp.