Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::hier::BoxIterator< DIM > Class Template Reference

#include <source/hierarchy/boxes/Box.h>

List of all members.

Public Member Functions

 BoxIterator ()
 BoxIterator (const Box< DIM > &box)
 BoxIterator (const BoxIterator< DIM > &iterator)
BoxIterator< DIM > & operator= (const BoxIterator< DIM > &iterator)
 ~BoxIterator ()
void initialize (const Box< DIM > &box)
 Initializer for the box iterator.
const Index< DIM > & operator * () const
const Index< DIM > & operator() () const
 operator bool () const
 operator const void * () const
bool operator! () const
void operator++ (int)
bool operator== (const BoxIterator< DIM > &iterator) const
bool operator!= (const BoxIterator< DIM > &iterator) const


Detailed Description

template<int DIM>
class SAMRAI::hier::BoxIterator< DIM >

Class BoxIterator is an iterator that provides methods for stepping through the index space associated with a box. The indices are enumerated in column-major (e.g., Fortran) order. The iterator should be used as follows:
   Box<DIM> box;
   ...
   for (Box<DIM>::Iterator b(box); b; b++) {
      // use index b of the box
   }
   
Note that the box iterator may not compile to efficient code, depending on your compiler. Many compilers are not smart enough to optimize the looping constructs and indexing operations.

See also:
hier::Index

hier::Box


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::BoxIterator< DIM >::BoxIterator  )  [inline]
 

Default constructor for the box iterator. The iterator must be initialized before it can be used to iterate over a box.

See also:
initialize().

template<int DIM>
SAMRAI::hier::BoxIterator< DIM >::BoxIterator const Box< DIM > &  box  )  [inline]
 

Constructor for the box iterator. The iterator will enumerate the indices in the argument box.

template<int DIM>
SAMRAI::hier::BoxIterator< DIM >::BoxIterator const BoxIterator< DIM > &  iterator  )  [inline]
 

Copy constructor for the box iterator.

template<int DIM>
SAMRAI::hier::BoxIterator< DIM >::~BoxIterator  )  [inline]
 

Destructor for the box iterator.


Member Function Documentation

template<int DIM>
BoxIterator< DIM > & SAMRAI::hier::BoxIterator< DIM >::operator= const BoxIterator< DIM > &  iterator  )  [inline]
 

Assignment operator for the box iterator.

template<int DIM>
void SAMRAI::hier::BoxIterator< DIM >::initialize const Box< DIM > &  box  )  [inline]
 

Initializer for the box iterator.

The iterator will enumerate the indices in the box.

template<int DIM>
const Index< DIM > & SAMRAI::hier::BoxIterator< DIM >::operator *  )  const [inline]
 

Return the current index in the box. This operation is undefined if the iterator is past the last Index in the box.

template<int DIM>
const Index< DIM > & SAMRAI::hier::BoxIterator< DIM >::operator()  )  const [inline]
 

Return the current index in the box. This operation is undefined if the iterator is past the last Index in the box.

template<int DIM>
SAMRAI::hier::BoxIterator< DIM >::operator bool  )  const [inline]
 

Return true if the iterator points to a valid index in the box.

template<int DIM>
SAMRAI::hier::BoxIterator< DIM >::operator const void *  )  const [inline]
 

Return a non-NULL if the iterator points to a valid index in the box.

template<int DIM>
bool SAMRAI::hier::BoxIterator< DIM >::operator!  )  const [inline]
 

Return whether the iterator points to a valid item in the box. This operator mimics the !p operation applied to a pointer p.

template<int DIM>
void SAMRAI::hier::BoxIterator< DIM >::operator++ int   )  [inline]
 

Increment the iterator to point to the next index in the box.

template<int DIM>
bool SAMRAI::hier::BoxIterator< DIM >::operator== const BoxIterator< DIM > &  iterator  )  const [inline]
 

Test two iterators for equality (same index value).

template<int DIM>
bool SAMRAI::hier::BoxIterator< DIM >::operator!= const BoxIterator< DIM > &  iterator  )  const [inline]
 

Test two iterators for inequality (different index values).


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:24:31 2005 for SAMRAI by  doxygen 1.4.2