IVSIterator Class Reference

#include <IntVectSet.H>

List of all members.


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:

   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 IntVectoperator() () const
 returns the IntVect that this iterator is at
const IntVectiv () 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

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

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 TreeIntVectSetIterator::begin(), DenseIntVectSetIterator::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 TreeIntVectSetIterator::end(), DenseIntVectSetIterator::end(), m_dense, m_isdense, and m_tree.


Member Data Documentation

bool IVSIterator::m_isdense [private]

Referenced by begin(), end(), ok(), operator()(), and operator++().

Referenced by begin(), end(), ok(), operator()(), and operator++().

Referenced by begin(), end(), ok(), operator()(), and operator++().


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

Generated on Fri Sep 22 03:43:03 2017 for Chombo + EB by  doxygen 1.5.5