Wrapper class for all ranges that can be used for Element traversal. More...
#include </home/chochlik/devel/oglplus/include/oglplus/opt/ranges.hpp>
Public Types | |
typedef const Unspecified | ValueType |
The type of value returned by Front. | |
Public Member Functions | |
Range (const Range &) | |
Copy constructor. | |
bool | Empty (void) const |
Returns true if the range is empty. | |
size_t | Size (void) const |
Returns the number of Elements in the range. | |
void | Next (void) |
Goes to the next element in the range. More... | |
ValueType | Front (void) |
Returns the element at the front of the range. More... | |
Wrapper class for all ranges that can be used for Element traversal.
This class cannot be instantiated and used directly in end-user code. It is here for documentation purposes only.
ValueType oglplus::Range::Front | ( | void | ) |
Returns the element at the front of the range.
The range must not be empty when calling Front, otherwise the result is undefined and the application may be aborted.
Referenced by oglplus::ranges::Find(), oglplus::ranges::Fold(), and oglplus::ranges::ForEach().
void oglplus::Range::Next | ( | void | ) |
Goes to the next element in the range.
This function moves the front of the range one element ahead. The range must not be empty when calling Next, otherwise the result is undefined and the application may be aborted.
Referenced by oglplus::ranges::Find(), oglplus::ranges::Fold(), and oglplus::ranges::ForEach().