Chombo + EB  3.2
Public Member Functions | Private Attributes | List of all members
IVSIterator Class Reference

Iterator for an IntVectSet. More...

#include <IntVectSet.H>

Public Member Functions

 IVSIterator ()
 
 IVSIterator (const IntVectSet &ivs)
 
 ~IVSIterator ()
 
void define (const IntVectSet &ivs)
 
const IntVectoperator() () const
 returns the IntVect that this iterator is at More...
 
const IntVectiv () const
 same as operator() More...
 
bool ok () const
 returns true if this iterator is still in its IntVectSet More...
 
void operator++ ()
 move iterator to the next IntVect in its IntVectSet More...
 
void incr ()
 same as operator++ More...
 
void begin ()
 initialize this iterator to the first IntVect in its IntVectSet More...
 
void reset ()
 same as begin() More...
 
void end ()
 move this iterator to after the last IntVect in the set More...
 

Private Attributes

bool m_isdense
 
DenseIntVectSetIterator m_dense
 
TreeIntVectSetIterator m_tree
 

Detailed Description

Iterator for an IntVectSet.

IVSIterator iterates over every point (IntVect) in an IntVectSet. It has exactly the same syntax and sematic as BoxIterator. Typical usage:

...
IVSIterator ivsit (ivs);
for (ivsit.begin(); ivsit.ok(); ++ivsit)
{
IntVect iv = ivsit();
(do operations involving iv)
}

Constructor & Destructor Documentation

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

Member Function Documentation

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

returns the IntVect that this iterator is at

References m_dense, m_isdense, and m_tree.

Referenced by iv().

const IntVect& IVSIterator::iv ( ) const
inline

same as operator()

References operator()().

Referenced by IntVectSet::minus_intvect().

bool IVSIterator::ok ( ) const
inline
void IVSIterator::operator++ ( )
inline

move iterator to the next IntVect in its IntVectSet

References m_dense, m_isdense, and m_tree.

void IVSIterator::incr ( )
inline

same as operator++

void IVSIterator::begin ( )
inline

initialize this iterator to the first IntVect in its IntVectSet

References DenseIntVectSetIterator::begin(), TreeIntVectSetIterator::begin(), m_dense, m_isdense, and m_tree.

Referenced by reset().

void IVSIterator::reset ( )
inline
void IVSIterator::end ( )
inline

move this iterator to after the last IntVect in the set

The iterator will be !ok() afterwards.

References DenseIntVectSetIterator::end(), TreeIntVectSetIterator::end(), m_dense, m_isdense, and m_tree.

Member Data Documentation

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++().


The documentation for this class was generated from the following file: