Value iterator for array of integers More...
#include <values-array.hpp>
Protected Attributes | |
int * | v |
Array for values. More... | |
int | c |
Current value. More... | |
int | n |
Number of ranges in array. More... | |
Constructors and initialization | |
Array (void) | |
Default constructor. More... | |
Array (int *v, int n) | |
Initialize with n values from v. More... | |
void | init (int *v, int n) |
Initialize with n ranges from v. More... | |
Iteration control | |
bool | operator() (void) const |
Test whether iterator is still at a value or done. More... | |
void | operator++ (void) |
Move iterator to next value (if possible) More... | |
void | reset (void) |
Reset iterator to start from beginning. More... | |
Value access | |
int | val (void) const |
Return current value. More... | |
Value iterator for array of integers
Allows to iterate the integers as defined by an array where the values in the array must be sorted in increasing order. The integers can be iterated several times provided the iterator is reset by the reset member function.
Definition at line 50 of file values-array.hpp.
|
inline |
Default constructor.
Definition at line 88 of file values-array.hpp.
|
inline |
Initialize with n values from v.
Definition at line 91 of file values-array.hpp.
|
inline |
Initialize with n ranges from v.
Definition at line 95 of file values-array.hpp.
|
inline |
Test whether iterator is still at a value or done.
Definition at line 104 of file values-array.hpp.
|
inline |
Move iterator to next value (if possible)
Definition at line 100 of file values-array.hpp.
|
inline |
Reset iterator to start from beginning.
Definition at line 108 of file values-array.hpp.
|
inline |
Return current value.
Definition at line 113 of file values-array.hpp.
|
protected |
Array for values.
Definition at line 53 of file values-array.hpp.
|
protected |
Current value.
Definition at line 55 of file values-array.hpp.
|
protected |
Number of ranges in array.
Definition at line 57 of file values-array.hpp.