|
|
|
|
|
|
|
|
|
|
|
|||||||
#include <iterator_range.hpp>
Inheritance diagram for iterator_range:

Notional Range methods | |
| ss_bool_t | is_open () const |
| Indicates whether the range is open. | |
| reference | current () |
| Returns the current value in the range. | |
| const_reference | current () const |
| Returns the current value in the range. | |
| operator boolean_type () const | |
| Indicates whether the range is open. | |
| reference | operator * () |
| Returns the current value in the range. | |
| const_reference | operator * () const |
| Returns the current value in the range. | |
| class_type & | advance () |
| Advances the current position in the range. | |
| class_type & | operator++ () |
| Advances the current position in the range. | |
| class_type | operator++ (int) |
| Advances the current position in the range, returning a copy of the range prior to its being advanced. | |
Public Types | |
| typedef I | iterator_type |
| The iterator type. | |
| typedef T | traits_type |
| The traits type. | |
| typedef iterable_range_tag | range_tag_type |
| The range tag type. | |
| typedef iterator_range< I, T > | class_type |
| The current instantiation of this type. | |
| typedef traits_type::value_type | value_type |
| The value type. | |
| typedef traits_type::iterator | iterator |
| The mutating (non-const) iterator type. | |
| typedef traits_type::const_iterator | const_iterator |
| The non-mutating (const) iterator type. | |
| typedef traits_type::reference | reference |
| The mutating (non-const) refernce type. | |
| typedef traits_type::const_reference | const_reference |
| The non-mutating (const) reference type. | |
Public Methods | |
| iterator_range (iterator first, iterator last) | |
| Constructs from an iterator pair. | |
| template<typename I2> | iterator_range (I2 first, I2 last) |
| Constructs from an iterator pair. | |
| template<typename T2, ss_size_t N> | iterator_range (T2(&ar)[N]) |
| Constructs from an array. | |
Iterable Range methods | |
| iterator | begin () |
| Returns an iterator to the current position of the range. | |
| iterator | end () |
| Returns an iterator to the end of the range. | |
| const_iterator | begin () const |
| Returns an iterator to the current position of the range. | |
| const_iterator | end () const |
| Returns an iterator to the end of the range. | |
| I | The iterator type |
| T | The iterator range traits, used to deduce the Range's iterator, const_iterator, reference, const_reference and value_type |
It could be used as follows
template<typename I>
void dump_elements(I from, I to)
{
for(iterator_range<I> r(from, to); r; ++r)
{
std::cout << &r; // Dump the current value to stdout
}
}
|
|
The current instantiation of this type.
|
|
|
The non-mutating (const) iterator type.
|
|
|
The non-mutating (const) reference type.
|
|
|
The mutating (non-const) iterator type.
|
|
|
The iterator type.
|
|
|
The range tag type.
|
|
|
The mutating (non-const) refernce type.
|
|
|
The traits type.
|
|
|
The value type.
|
|
||||||||||||
|
Constructs from an iterator pair.
|
|
||||||||||||
|
Constructs from an iterator pair.
|
|
|
Constructs from an array.
|
|
|
Advances the current position in the range.
|
|
|
Returns an iterator to the current position of the range.
|
|
|
Returns an iterator to the current position of the range.
|
|
|
Returns the current value in the range.
|
|
|
Returns the current value in the range.
|
|
|
Returns an iterator to the end of the range.
|
|
|
Returns an iterator to the end of the range.
|
|
|
Indicates whether the range is open.
|
|
|
Returns the current value in the range.
|
|
|
Returns the current value in the range.
|
|
|
Indicates whether the range is open.
|
|
|
Advances the current position in the range, returning a copy of the range prior to its being advanced.
|
|
|
Advances the current position in the range.
|
|
|
| STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004 |