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

Notional Range methods | |
| ss_bool_t | is_open () const |
| Indicates whether the range is open. | |
| value_type | current () const |
| Returns the current value in the range. | |
| class_type & | advance () |
| Advances the current position in the range. | |
| operator operator_bool_type () const | |
| Indicates whether the range is open. | |
| value_type | 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 Methods | |
Construction | |
| integral_range (value_type first, value_type last, value_type increment=+1) | |
| Constructs from a start and end position, and an increment. | |
| ~integral_range () | |
| Destructor. | |
Comparison | |
| bool | operator== (class_type const &rhs) const |
| Evaluates whether two ranges are equal. | |
| bool | operator!= (class_type const &rhs) const |
| Evaluates whether two ranges are unequal. | |
It is categoried as a Notional Range
It could be used as follows
// Create a range of integer values, in the range [-100, 200), in increments of 5
stlsoft::integral_range<int> r(-100, +100, 5);
// Calculate the total
int total = stlsoft::r_accumulate(r, 0);
|
||||||||||||||||
|
Constructs from a start and end position, and an increment.
|
|
|
Destructor.
|
|
|
Advances the current position in the range.
|
|
|
Returns the current value in the range.
|
|
|
Indicates whether the range is open.
|
|
|
Returns the current value in the range.
|
|
|
Indicates whether the range is open.
|
|
|
Evaluates whether two ranges are unequal.
|
|
|
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.
|
|
|
Evaluates whether two ranges are equal.
|
|
|
| STLSoft Libraries documentation © Synesis Software Pty Ltd, 2001-2004 |