Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

IVSIterator Class Reference

Iterator for an IntVectSet. More...

#include <IntVectSet.H>

Collaboration diagram for IVSIterator:

Collaboration graph
[legend]
List of all members.

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

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)
   }


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::begin  )  [inline]
 

initialize this iterator to the first IntVect in its IntVectSet

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.

void IVSIterator::end  )  [inline]
 

move this iterator to after the last IntVect in the set

The iterator will be !ok() afterwards.

void IVSIterator::incr  )  [inline]
 

same as operator++

const IntVect& IVSIterator::iv  )  const [inline]
 

same as operator()

bool IVSIterator::ok  )  const [inline]
 

returns true if this iterator is still in its IntVectSet

const IntVect & IVSIterator::operator()  )  const [inline]
 

returns the IntVect that this iterator is at

void IVSIterator::operator++  )  [inline]
 

move iterator to the next IntVect in its IntVectSet

void IVSIterator::reset  )  [inline]
 

same as begin()


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 12:48:10 2005 for Chombo&AMRIdealMHD by  doxygen 1.4.1