Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
ScopedCollection< I, siz >::PullFrom< IT > Class Template Reference

#include "lib/scoped-collection.hpp"

Description

template<class I, size_t siz = sizeof(I)>
template<typename IT>
class lib::ScopedCollection< I, siz >::PullFrom< IT >

fills the ScopedCollection with default constructed TY-instances

usage
This variant allows to "pull" elements from an iterator. Actually, the collection will try to create each element right away, by invoking the copy ctor and passing the value yielded by the iterator.
Note
anything in accordance to the Lumiera Forward Iterator pattern is OK. This rules out just passing a plain STL iterator (because these can't tell for themselves when they're exhausted). Use an suitable iter-adapter instead, e.g. by invoking lib::iter_stl::eachElm(stl_container)

Definition at line 460 of file scoped-collection.hpp.

Public Member Functions

 PullFrom (IT source)
 
void operator() (ScopedCollection< I, siz >::ElementHolder &storage)
 

Private Types

using ElementType = meta::ValueTypeBinding< IT >::value_type
 

Private Attributes

IT iter_
 

Constructor & Destructor Documentation

◆ PullFrom()

template<class I , size_t siz = sizeof(I)>
template<typename IT >
PullFrom ( IT  source)
inline

Definition at line 467 of file scoped-collection.hpp.

Member Typedef Documentation

◆ ElementType

template<class I , size_t siz = sizeof(I)>
template<typename IT >
using ElementType = meta::ValueTypeBinding<IT>::value_type
private

Definition at line 464 of file scoped-collection.hpp.

Member Function Documentation

◆ operator()()

template<class I , size_t siz = sizeof(I)>
template<typename IT >
void operator() ( ScopedCollection< I, siz >::ElementHolder &  storage)
inline

Definition at line 472 of file scoped-collection.hpp.

Member Data Documentation

◆ iter_

template<class I , size_t siz = sizeof(I)>
template<typename IT >
IT iter_
private

Definition at line 462 of file scoped-collection.hpp.

+ Collaboration diagram for ScopedCollection< I, siz >::PullFrom< IT >:

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