Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BoxIterator Class Reference

iterates through the IntVects of a Box More...

#include <BoxIterator.H>

Collaboration diagram for BoxIterator:

Collaboration graph
[legend]
List of all members.

Public Methods

 BoxIterator ()
 BoxIterator (const Box &a_bx)
void setBox (const Box &a_bx)
void define (const Box &a_bx)
 BoxIterator (const BoxIterator &a_iterIn)
 ~BoxIterator ()
void begin ()
void reset ()
void operator++ ()
void next ()
const IntVectoperator() () const
bool ok ()

Protected Attributes

IntVect m_current
IntVect m_boxLo
IntVect m_boxHi

Detailed Description

iterates through the IntVects of a Box

BoxIterator iterates through the IntVects of a box. The actual sqeuence of IntVects is implementation-specific. Typical usage:

Box b; ... BoxIterator bit (b); for (bit.begin(); bit.ok(); ++bit) { IntVect iv = bit(); (do operations involving iv) }


Constructor & Destructor Documentation

BoxIterator::BoxIterator  
 

Default constructor. This constructs an invalid iterator. The user must call define before using.

BoxIterator::BoxIterator const Box   a_bx
 

Constructs a BoxIterator and associates it with a Box. Arguments: a_bx (not modified) the Box to iterate over.

BoxIterator::BoxIterator const BoxIterator &    a_iterIn
 

Copy constructor. Arguments: a_iterIn (not modified) the BoxIterator to copy.

BoxIterator::~BoxIterator  
 


Member Function Documentation

void BoxIterator::begin  
 

Sets this BoxIterator to the first IntVect in its Box. The definition of the "first" IntVect is implementation-dependent.

void BoxIterator::define const Box   a_bx
 

Associates a Box with this BoxIterator. Arguments: a_bx (not modified) the Box to iterate over.

void BoxIterator::next  
 

bool BoxIterator::ok  
 

Returns true if this BoxIterator's location is within its Box.

const IntVect& BoxIterator::operator()   const
 

Returns the value of the InVect for the current location of this BoxIterator.

void BoxIterator::operator++  
 

Modifies this BoxIterator to set it to the next location in its Box. The definition of the "next location" of a Box is implementation-dependent.

void BoxIterator::reset  
 

Sets this BoxIterator to the first IntVect in its Box. The definition of the "first" IntVect is implementation-dependent.

void BoxIterator::setBox const Box   a_bx
 


Member Data Documentation

IntVect BoxIterator::m_boxHi [protected]
 

IntVect BoxIterator::m_boxLo [protected]
 

IntVect BoxIterator::m_current [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Jan 19 17:55:40 2005 for Chombo&INSwithParticles by doxygen1.2.16