Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
lib::iter_source Namespace Reference

Namespaces

namespace  anonymous_namespace{iter-source.hpp}
 

Functions

template<class IT >
_IterT< IT >::Iter wrapIter (IT &&source)
 wraps a given Lumiera Forward Iterator, exposing just a IterSource based frontend.
 
template<typename VAL >
auto singleVal (VAL &&something)
 an IterSource frontend to return just a single value once.
 
template<class IT , class FUN >
_TransformIterT< IT, FUN >::Iter transform (IT &&source, FUN processingFunc)
 pipes a given Lumiera Forward Iterator through a transformation function and wraps the resulting transforming Iterator, exposing just an IterSource.
 
template<class MAP >
_MapT< MAP >::KeyIter eachMapKey (MAP &map)
 
template<class MAP >
_MapT< MAP >::ValIter eachMapVal (MAP &map)
 
template<class MAP >
_MapT< MAP >::KeyIter eachDistinctKey (MAP &map)
 
template<class MAP >
_MapT< MAP >::ValIter eachValForKey (MAP &map, typename _MapT< MAP >::Key key)
 
template<class CON >
_SeqT< CON >::Iter eachEntry (CON &container)
 
template<class IT >
_RangeT< IT >::Iter eachEntry (IT const &begin, IT const &end)
 

Function Documentation

◆ wrapIter()

template<class IT >
_IterT< IT >::Iter wrapIter ( IT &&  source)
protected

wraps a given Lumiera Forward Iterator, exposing just a IterSource based frontend.

Definition at line 360 of file iter-source.hpp.

References IterSource< TY >::build(), and wrapIter().

Referenced by eachDistinctKey(), eachMapKey(), eachMapVal(), eachValForKey(), and wrapIter().

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

◆ singleVal()

template<typename VAL >
auto singleVal ( VAL &&  something)
protected

an IterSource frontend to return just a single value once.

Warning
behind the scenes, a heap allocation is managed by shared_ptr, to maintain a copy of the wrapped element. When passing a reference, only a reference will be wrapped, but a heap allocation happens nonetheless

Definition at line 376 of file iter-source.hpp.

References IterSource< TY >::build(), singleVal(), and lib::singleValIterator().

Referenced by singleVal().

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

◆ transform()

template<class IT , class FUN >
_TransformIterT< IT, FUN >::Iter transform ( IT &&  source,
FUN  processingFunc 
)
protected

pipes a given Lumiera Forward Iterator through a transformation function and wraps the resulting transforming Iterator, exposing just an IterSource.

This convenience shortcut can be used to build a processing chain; the resulting IterSource will hide any detail types involved.

Note
as with any IterSource, there is one virtual function call for every fetched element.

Definition at line 396 of file iter-source.hpp.

References IterSource< TY >::build(), transform(), and lib::transformIterator().

Referenced by OutputSlotImplBase::ConnectionManager< CON >::getOpenedSinks(), and transform().

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

◆ eachMapKey()

template<class MAP >
_MapT< MAP >::KeyIter eachMapKey ( MAP &  map)
protected
Returns
a Lumiera Forward Iterator to yield all the keys of the given Map or Hashtable

Definition at line 412 of file iter-source.hpp.

References eachMapKey(), and wrapIter().

Referenced by eachMapKey().

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

◆ eachMapVal()

template<class MAP >
_MapT< MAP >::ValIter eachMapVal ( MAP &  map)
protected
Returns
a Lumiera Forward Iterator to yield all the values of the given Map or Hashtable

Definition at line 426 of file iter-source.hpp.

References eachMapVal(), and wrapIter().

Referenced by eachMapVal().

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

◆ eachDistinctKey()

template<class MAP >
_MapT< MAP >::KeyIter eachDistinctKey ( MAP &  map)
protected
Returns
a Lumiera Forward Iterator to yield all distinct keys of a Multimap
Warning
we do a full table scan to find the distinct keys

Definition at line 442 of file iter-source.hpp.

References lib::filterRepetitions(), and wrapIter().

+ Here is the call graph for this function:

◆ eachValForKey()

template<class MAP >
_MapT< MAP >::ValIter eachValForKey ( MAP &  map,
typename _MapT< MAP >::Key  key 
)
protected
Returns
a Lumiera Forward Iterator to yield all values associated to the given key within this Map or Multimap
Note
obviously in case of a Map we'll get at most one result.

Definition at line 457 of file iter-source.hpp.

References wrapIter().

+ Here is the call graph for this function:

◆ eachEntry() [1/2]

template<class CON >
_SeqT< CON >::Iter eachEntry ( CON &  container)
protected
Parameters
containera STL-like container, providing
  • a typedef iterator
  • functions begin() and end()
Returns
a Lumiera Forward Iterator yielding all values starting with begin and excluding end .

Definition at line 476 of file iter-source.hpp.

References IterSource< TY >::build(), and eachEntry().

Referenced by eachEntry(), eachEntry(), and SimulatedBuilderContext::getAllModelPorts().

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

◆ eachEntry() [2/2]

template<class IT >
_RangeT< IT >::Iter eachEntry ( IT const &  begin,
IT const &  end 
)
protected
Returns
a Lumiera Forward Iterator to yield all values defined by a classical Iterator range.

Definition at line 491 of file iter-source.hpp.

References IterSource< TY >::build(), and eachEntry().

+ Here is the call graph for this function: