HDK
|
Iteration over a range of elements. More...
#include <GA_Iterator.h>
Public Member Functions | |
GA_Iterator () | |
GA_Iterator (const GA_Range &range) | |
GA_Iterator (const GA_Range &range, GA_Range::safedeletions) | |
GA_Iterator (const GA_Iterator &iterator) | |
~GA_Iterator () | |
bool | isValid () const |
Test to see whether the iterator is valid. More... | |
GA_AttributeOwner | getOwner () const |
Query the element type that is being iterated over. More... | |
bool | blockAdvance (GA_Offset &start, GA_Offset &end) |
bool | fullBlockAdvance (GA_Offset &start, GA_Offset &end) |
const GA_Iterator & | operator= (const GA_Iterator &src) |
bool | operator== (const GA_Iterator &src) const |
bool | operator!= (const GA_Iterator &src) const |
GA_Offset | getOffset () const |
GA_Offset | operator* () const |
GA_Index | getIndex () const |
void | rewind () |
bool | atEnd () const |
void | advance () |
GA_Iterator & | operator++ () |
Iteration over a range of elements.
An iterator is used to iterate over the elements of a given range. All state information for the iteration is stored by the iterator, external to the range in question. All iterators are constructed rewound, so in most cases there is no need for an explicit rewind() call.
Definition at line 29 of file GA_Iterator.h.
GA_Iterator::GA_Iterator | ( | ) |
|
explicit |
GA_Iterator::GA_Iterator | ( | const GA_Range & | range, |
GA_Range::safedeletions | |||
) |
Ensure safe iteration if elements from the range are deleted during traversal.
GA_Iterator::GA_Iterator | ( | const GA_Iterator & | iterator | ) |
GA_Iterator::~GA_Iterator | ( | ) |
|
inline |
Standard iterator methods.
Definition at line 94 of file GA_Iterator.h.
|
inline |
Standard iterator methods.
Definition at line 93 of file GA_Iterator.h.
Perform a block iteration. The block iteration will provide a contiguous block of offsets which can be operated upon in batch. Blocks are constrained to occupy a single page, so no block can cross a page boundary. Consequently contiguous sequences that cross page boundaries are automatically split into multiple blocks. The (start, end] range is like Python in that start
is included in the range, but end
is not. For example:
Like blockAdvance, except that the block isn't guaranteed to be all within one page. The block is the maximum contiguous block returned by the GA_Range.
|
inline |
Query the ordered index for the current state. Note that this will perform a lookup into the index map, which may not be extremely efficient.
Definition at line 75 of file GA_Iterator.h.
|
inline |
Query state of the iterator
Definition at line 59 of file GA_Iterator.h.
|
inline |
Query the element type that is being iterated over.
Definition at line 52 of file GA_Iterator.h.
|
inline |
Test to see whether the iterator is valid.
Definition at line 41 of file GA_Iterator.h.
|
inline |
Standard operators
Definition at line 47 of file GA_Iterator.h.
|
inline |
Query state of the iterator
Definition at line 64 of file GA_Iterator.h.
|
inline |
Standard iterator methods.
Definition at line 104 of file GA_Iterator.h.
const GA_Iterator& GA_Iterator::operator= | ( | const GA_Iterator & | src | ) |
Standard operators
bool GA_Iterator::operator== | ( | const GA_Iterator & | src | ) | const |
Standard operators
void GA_Iterator::rewind | ( | ) |
Standard iterator methods.