#include <IntVectSet.H>
IVSIterator iterates over every point (IntVect) in an IntVectSet. It has exactly the same syntax and sematic as BoxIterator. Typical usage:
IntVectSet ivs; ... IVSIterator ivsit (ivs); for (ivsit.begin(); ivsit.ok(); ++ivsit) { IntVect iv = ivsit(); (do operations involving iv) }
Public Member Functions | |
IVSIterator () | |
IVSIterator (const IntVectSet &ivs) | |
~IVSIterator () | |
void | define (const IntVectSet &ivs) |
const IntVect & | operator() () const |
returns the IntVect that this iterator is at | |
const IntVect & | iv () const |
same as operator() | |
bool | ok () const |
returns true if this iterator is still in its IntVectSet | |
void | operator++ () |
move iterator to the next IntVect in its IntVectSet | |
void | incr () |
same as operator++ | |
void | begin () |
initialize this iterator to the first IntVect in its IntVectSet | |
void | reset () |
same as begin() | |
void | end () |
move this iterator to after the last IntVect in the set | |
Private Attributes | |
bool | m_isdense |
DenseIntVectSetIterator | m_dense |
TreeIntVectSetIterator | m_tree |
IVSIterator::IVSIterator | ( | ) | [inline] |
A default constructed iterator iterates over an empty IntVectSet. It starts in the begin()
state, and is never ok()
.
IVSIterator::IVSIterator | ( | const IntVectSet & | ivs | ) |
Iterates over IntVectSet ivs. There is no canonical ordering. Starts in the begin()
state.
IVSIterator::~IVSIterator | ( | ) | [inline] |
void IVSIterator::define | ( | const IntVectSet & | ivs | ) |
Modifies this IVSIterator to iterate over the IntVectSet ivs. There is no canonical ordering. Starts in the begin()
state.
const IntVect & IVSIterator::operator() | ( | ) | const [inline] |
const IntVect& IVSIterator::iv | ( | ) | const [inline] |
bool IVSIterator::ok | ( | ) | const [inline] |
returns true if this iterator is still in its IntVectSet
References m_dense, m_isdense, m_tree, TreeIntVectSetIterator::ok(), and DenseIntVectSetIterator::ok().
Referenced by MiniIVFAB< T >::define(), IVSFAB< T >::define(), and BaseIVFAB< T >::define().
void IVSIterator::operator++ | ( | ) | [inline] |
void IVSIterator::incr | ( | ) | [inline] |
same as operator++
void IVSIterator::begin | ( | ) | [inline] |
initialize this iterator to the first IntVect in its IntVectSet
References TreeIntVectSetIterator::begin(), DenseIntVectSetIterator::begin(), m_dense, m_isdense, and m_tree.
Referenced by reset().
void IVSIterator::reset | ( | ) | [inline] |
same as begin()
References begin().
Referenced by MiniIVFAB< T >::define(), IVSFAB< T >::define(), and BaseIVFAB< T >::define().
void IVSIterator::end | ( | ) | [inline] |
move this iterator to after the last IntVect in the set
The iterator will be !ok() afterwards.
References TreeIntVectSetIterator::end(), DenseIntVectSetIterator::end(), m_dense, m_isdense, and m_tree.
bool IVSIterator::m_isdense [private] |
Referenced by begin(), end(), ok(), operator()(), and operator++().
DenseIntVectSetIterator IVSIterator::m_dense [private] |
Referenced by begin(), end(), ok(), operator()(), and operator++().
TreeIntVectSetIterator IVSIterator::m_tree [private] |
Referenced by begin(), end(), ok(), operator()(), and operator++().