|
|
|
|
|
|
|
|
|
|
|
|||||||
#include <sequence_range.hpp>
Inheritance diagram for sequence_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. | |
| class_type & | advance () |
| Advances the current position 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 & | 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 S | sequence_type |
| The sequence type. | |
| typedef T | traits_type |
| The traits type. | |
| typedef iterable_range_tag | range_tag_type |
| The range category tag type. | |
| typedef sequence_range< S, T > | class_type |
| The current instantiation of the type. | |
| typedef traits_type::sequence_reference_type | sequence_reference_type |
| The sequence reference 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) reference type. | |
| typedef traits_type::const_reference | const_reference |
| The non-mutating (const) reference type. | |
| typedef traits_type::difference_type | difference_type |
| The difference type. | |
| typedef traits_type::size_type | size_type |
| The size type. | |
Public Methods | |
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. | |
| S | The sequence class |
| T | The sequence range traits, used to deduce the Range's iterator, const_iterator, reference, const_reference and value_type |
It could be used as follows
void dump_elements(std::vector<int> const &numbers)
{
for(sequence_range<std::vector<int> > r(numbers.begin(), numbers.end()); r; ++r)
{
std::cout << &r; // Dump the current value to stdout
}
}
|
|
The current instantiation of the type.
|
|
|
The non-mutating (const) iterator type.
|
|
|
The non-mutating (const) reference type.
|
|
|
The difference type.
|
|
|
The mutating (non-const) iterator type.
|
|
|
The range category tag type.
|
|
|
The mutating (non-const) reference type.
|
|
|
The sequence reference type.
|
|
|
The sequence type.
|
|
|
The size type.
|
|
|
The traits type.
|
|
|
The value type.
|
|
|
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 |