Support Class Library
A set of tools providing classes and utility
|
An adapter for STL-like iterators from stream iterators. More...
#include "StlAdapter.h"
Public Types | |
using | iterator_type = StreamIterator< T > |
The type of stream iterator handled. More... | |
using | payload_type = typename iterator_type::payload_type |
The type of stream iterator payload. More... | |
using | iterator_category = std::forward_iterator_tag |
The category of this iterator type. More... | |
using | value_type = payload_type |
The type of value provided by the iterators. More... | |
using | difference_type = std::ptrdiff_t |
The type of the difference in size between iterators. More... | |
using | pointer = value_type * |
Pointer type for the value type. More... | |
using | reference = value_type & |
Reference type for the value type. More... | |
Public Member Functions | |
StlAdapter (iterator_type *sit=nullptr) | |
Construct an adapter from an iterator. More... | |
StlAdapter (iterator_type *sit, payload_type payload) | |
Construt an adapter from an iterator and a specific payload. More... | |
StlAdapter & | operator++ () |
Pre-increment operator. More... | |
StlAdapter | operator++ (int) |
Post-increment operator. More... | |
bool | operator== (const StlAdapter &rhs) const |
Equality operator. More... | |
bool | operator!= (const StlAdapter &rhs) const |
Difference operator. More... | |
payload_type | operator* () const |
Dereference operator. More... | |
Protected Attributes | |
iterator_type * | it |
A pointer to the iterator handled by this adapter. More... | |
payload_type | payload |
The current payload. More... | |
An adapter for STL-like iterators from stream iterators.
T | being the type of value handled |
Definition at line 18 of file StlAdapter.h.
scl::stream::details::iterator::StlAdapter< T >::difference_type |
The type of the difference in size between iterators.
Definition at line 49 of file StlAdapter.h.
scl::stream::details::iterator::StlAdapter< T >::iterator_category |
The category of this iterator type.
Definition at line 37 of file StlAdapter.h.
scl::stream::details::iterator::StlAdapter< T >::iterator_type |
The type of stream iterator handled.
Definition at line 24 of file StlAdapter.h.
scl::stream::details::iterator::StlAdapter< T >::payload_type |
The type of stream iterator payload.
Definition at line 30 of file StlAdapter.h.
scl::stream::details::iterator::StlAdapter< T >::pointer |
Pointer type for the value type.
Definition at line 55 of file StlAdapter.h.
scl::stream::details::iterator::StlAdapter< T >::reference |
Reference type for the value type.
Definition at line 61 of file StlAdapter.h.
scl::stream::details::iterator::StlAdapter< T >::value_type |
The type of value provided by the iterators.
Definition at line 43 of file StlAdapter.h.
|
inlineexplicit |
Construct an adapter from an iterator.
sit | being the stream iterator to construct from (nullptr for end iterator) |
Definition at line 84 of file StlAdapter.h.
|
inline |
Construt an adapter from an iterator and a specific payload.
sit | being the stream iterator to construct from (nullptr for end iterator) |
payload | being the initial payload |
Definition at line 92 of file StlAdapter.h.
|
inline |
Difference operator.
rhs | being the adapter to compare to |
Definition at line 145 of file StlAdapter.h.
|
inline |
|
inline |
Pre-increment operator.
Definition at line 100 of file StlAdapter.h.
|
inline |
Post-increment operator.
Definition at line 115 of file StlAdapter.h.
|
inline |
Equality operator.
rhs | being the adapter to compare to |
Definition at line 129 of file StlAdapter.h.
|
protected |
A pointer to the iterator handled by this adapter.
Definition at line 71 of file StlAdapter.h.
|
protected |
The current payload.
Definition at line 77 of file StlAdapter.h.