A cursor into a list of references - e.g., a search result A single reference is an array of uint64s.
More...
#include <reflist.h>
A cursor into a list of references - e.g., a search result A single reference is an array of uint64s.
Definition at line 26 of file reflist.h.
| uint64 Xpace::RefListCursor::getCount |
( |
| ) |
const |
- Returns
- the number of references in the list
| uint64 Xpace::RefListCursor::getPosition |
( |
| ) |
const |
- Returns
- the current cursor position within the list
| bool Xpace::RefListCursor::move |
( |
int64 |
distance = 1, |
|
|
bool |
relative = true |
|
) |
| |
move the cursor
- Parameters
-
| distance | the distance to move |
| relative | the starting point; true = move from current position, false = move from start |
- Returns
- true if move succeeded, false (and do not move) otherwise
| uint64 Xpace::RefListCursor::operator* |
( |
| ) |
const |
- Returns
- the first element of the current ref
| const uint64* Xpace::RefListCursor::get |
( |
| ) |
const |
- Returns
- a pointer to the array of uint64s that make up the current ref
| const uint64* Xpace::RefListCursor::get |
( |
uint * |
len | ) |
const |
- Parameters
-
| len | - fillin for the number of elements in the current ref |
- Returns
- a pointer to the array of uint64s that make up the current ref
| bool Xpace::RefListCursor::forEach |
( |
Sink * |
sink, |
|
|
uint64 |
start = 0 |
|
) |
| const |
Enumerate references in the cursor's underlying reference list, starting at start (relative to the whole list), calling the callThis functor for each one.
The cursor itself is unchanged.
- Parameters
-
| call | This will be called for each reference in the list |
| start | Call callThis beginning at this ref |
- Returns
- true if all references were iterated, false if iteration was aborted
| bool Xpace::RefListCursor::operator! |
( |
| ) |
const |
- Returns
- true if past last ref
this list OR rhs list
- Parameters
-
this list AND rhs list
- Parameters
-
AND a vector of ref lists.
- Parameters
-
| list | the source lists. NB - any of these may be altered |
- Returns
- the result, which may be one of the source lists
count the refs in this list AND rhs list
- Parameters
-
- Returns
- the number of refs
| void Xpace::RefListCursor::opNot |
( |
uint64 |
end = 0 | ) |
|
invert a ref list
- Parameters
-
| end | the number of refs in the universe; if 0, get from index |
Does this reference list have this ref?
- Parameters
-
| ref | look for this ref |
| pos | fill-in the position in the list of this ref |
- Returns
- true if the list has the ref, false if not
Referenced by Xpace::SortToSink< LIST >::complete().
| bool Xpace::RefListCursor::hasRef |
( |
std::vector< uint64 > & |
ref, |
|
|
uint64 * |
pos = 0 |
|
) |
| const |
Does this reference list have this ref?
- Parameters
-
| ref | look for this ref |
| pos | fill-in the position in the list of this ref |
- Returns
- true if the list has the ref, false if not
| void Xpace::RefListCursor::addRef |
( |
uint64 |
ref | ) |
|
add a reference to the list
- Parameters
-
| void Xpace::RefListCursor::addRef |
( |
std::vector< uint64 > & |
ref | ) |
|
| void Xpace::RefListCursor::removeRef |
( |
uint64 |
ref | ) |
|
remove a reference from the list
- Parameters
-
| remove | this ref (if it exists) |
| void Xpace::RefListCursor::removeRef |
( |
std::vector< uint64 > |
ref | ) |
|
- Parameters
-
| remove | this ref (if it exists) |
The documentation for this class was generated from the following file: