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

LayoutIterator Class Reference

An Iterator based on a BoxLayout object. More...

#include <LayoutIterator.H>

Inheritance diagram for LayoutIterator:

Inheritance graph
[legend]
Collaboration diagram for LayoutIterator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LayoutIterator ()
 a null constructed LayoutIterator will return false on ok()

 LayoutIterator (const BoxLayout &a_layout)
 ~LayoutIterator ()
const LayoutIndexoperator() () const
 return the index that this iterator is at

LayoutIndex i () const
 return a copy of the index that this iterator is at

void operator++ ()
 move the iterator to the next Box in the layout

void incr ()
 move the iterator to the next Box in the layout

bool ok () const
 return true if this iterator is still in its Layout

void begin ()
 initialize this iterator to the first Box in its Layout

void reset ()
 same as begin()

void end ()
 move this iterator to after the last Box in the layout


Protected Member Functions

 LayoutIterator (const BoxLayout &boxlayout, const int *layoutID)

Protected Attributes

BoxLayout m_layout
unsigned int m_index
LayoutIndex m_current

Friends

class BoxLayout

Detailed Description

An Iterator based on a BoxLayout object.

An Iterator based on a BoxLayout object. It does not support a dereferencing operation(1), since it is intended to work with all of BoxLayouts, DisjointBoxLayouts, BoxLayoutDatas LevelData's, and any object that is built on top of a BoxLayout object. LayoutIterator accesses the data in a BoxLayout-based object in a NON-data-parallel manner (i.e. every processor iterates through all the Boxes in the BoxLayout). This differs from the DataIterator class.

BoxLayout-based objects can act as the Factory for the LayoutIterator.

(1) STL-speak. not critical for comprehension, but can help people familiar with STL iterators and expecting similar behaviour.


Constructor & Destructor Documentation

LayoutIterator::LayoutIterator  )  [inline]
 

a null constructed LayoutIterator will return false on ok()

LayoutIterator::LayoutIterator const BoxLayout a_layout  )  [inline]
 

LayoutIterator::~LayoutIterator  )  [inline]
 

LayoutIterator::LayoutIterator const BoxLayout boxlayout,
const int *  layoutID
[protected]
 


Member Function Documentation

void LayoutIterator::begin  )  [inline]
 

initialize this iterator to the first Box in its Layout

void LayoutIterator::end  ) 
 

move this iterator to after the last Box in the layout

The iterator will be !ok() afterwards.

LayoutIndex LayoutIterator::i  )  const [inline]
 

return a copy of the index that this iterator is at

Reimplemented in DataIterator.

void LayoutIterator::incr  )  [inline]
 

move the iterator to the next Box in the layout

bool LayoutIterator::ok  )  const [inline]
 

return true if this iterator is still in its Layout

const LayoutIndex & LayoutIterator::operator()  )  const [inline]
 

return the index that this iterator is at

Reimplemented in DataIterator.

void LayoutIterator::operator++  )  [inline]
 

move the iterator to the next Box in the layout

void LayoutIterator::reset  ) 
 

same as begin()


Friends And Related Function Documentation

friend class BoxLayout [friend]
 

Reimplemented in DataIterator.


Member Data Documentation

LayoutIndex LayoutIterator::m_current [protected]
 

unsigned int LayoutIterator::m_index [protected]
 

BoxLayout LayoutIterator::m_layout [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Jun 2 13:58:42 2004 for Chombo&INSwithParticles by doxygen 1.3.2