![]() |
Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/iter-adapter-stl.hpp"
materialised iterator contents.
At construction, the given source iterator is immediately discharged into an internal buffer (vector). This captured value sequence can then be retrieved once as Lumiera Forward Iterator
Definition at line 414 of file iter-adapter-stl.hpp.
Public Types | |
typedef VAL * | pointer |
typedef VAL & | reference |
typedef VAL | value_type |
Public Member Functions | |
IterSnapshot () | |
create empty snapshot | |
template<class IT > | |
IterSnapshot (IT &&src) | |
take snapshot by discharging the given Lumiera Forward iterator More... | |
template<class IT > | |
IterSnapshot (IT const &src) | |
build snapshot from a copy of the Lumiera Iterator More... | |
template<class IT > | |
IterSnapshot (IT &&pos, IT const &end) | |
take snapshot by consuming a STL iterator | |
template<class IT > | |
IterSnapshot (IT const &begin, IT const &end) | |
take snapshot from STL iterator | |
IterSnapshot (IterSnapshot &&)=default | |
IterSnapshot (IterSnapshot const &)=default | |
bool | empty () const |
bool | isValid () const |
operator bool () const | |
reference | operator* () const |
IterSnapshot & | operator++ () |
pointer | operator-> () const |
IterSnapshot & | operator= (IterSnapshot const &)=default |
IterSnapshot & | operator= (IterSnapshot &&)=default |
size_t | size () const |
Friends | |
bool | operator!= (IterSnapshot const &snap1, IterSnapshot const &snap2) |
bool | operator== (IterSnapshot const &s1, IterSnapshot const &s2) |
equality is based first on the valid state (to support pos != end ) and then on the actual position and contents of the snapshots | |
Private Types | |
typedef std::vector< VAL > | Sequence |
Private Member Functions | |
void | _maybe_throw () const |
Private Attributes | |
Sequence | buffer_ |
size_t | pos_ = 0 |
|
inline |
take snapshot by discharging the given Lumiera Forward iterator
Definition at line 432 of file iter-adapter-stl.hpp.
|
inline |
build snapshot from a copy of the Lumiera Iterator
Definition at line 443 of file iter-adapter-stl.hpp.