Boolean Vector Cursor.
More...
#include <rboolcursor.h>
Boolean Vector Cursor.
The RBoolCursor class provides a cursor over a vector of boolean values.
RBoolVector a(3);
a[0]=1.0;
a[1]=2.0;
a[2]=3.0;
for(Cur.Start();!Cur.End();Cur.Next())
Copy constructor.
- Parameters
-
Construct a cursor over a given vector.
- Parameters
-
vector | Vector. |
min | Minimum position of the elements to iterate. |
max | Maximum position of the elements to iterate (included max). If SZE_MAX, iterate until the end of the container. |
Set a cursor to a given vector.
- Parameters
-
vector | Vector. |
min | Minimum position of the elements to iterate. |
max | Maximum position of the elements to iterate (included max). If SZE_MAX, iterate until the end of the container. |
size_t GetNb |
( |
void |
| ) |
const |
Get the number of values in the list.
- Returns
- size_t
Start the iterator to go trough the vector.
void StartFromEnd |
( |
void |
| ) |
|
Start the iterator at the end of the vector.
Test if the end of the vector is reached.
bool Begin |
( |
void |
| ) |
const |
Test if the begin of the vector is reached.
Go to the i-th position of the cursor.
- Parameters
-
idx | Index of the element to get. |
void Next |
( |
size_t |
inc = 1 | ) |
|
Go to a given number of next elements. If the end is reached, go to the beginning.
- Parameters
-
inc | Number of elements to go to. |
void Prev |
( |
size_t |
inc = 1 | ) |
|
Go to a given number of previous elements. If the begin is reached, go to the end.
- Parameters
-
inc | Number of elements to go to. |
bool operator() |
( |
void |
| ) |
const |
Return the current element (const version).
bool& operator() |
( |
void |
| ) |
|
Return the current element.
size_t GetPos |
( |
void |
| ) |
const |
Return the actual position in the cursor.
Number of values in the vector.
The array representing the values.
Pointer used to parse the vector.
The first position in the array handled by the cursor.
The last position in the array handled by the cursor.