LayoutIterator Class Reference

#include <LayoutIterator.H>

Inheritance diagram for LayoutIterator:

Inheritance graph
[legend]
Collaboration diagram for LayoutIterator:

Collaboration graph
[legend]

List of all members.


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.

Public Member Functions

 LayoutIterator ()
 a null constructed LayoutIterator will return false on ok()
virtual ~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
virtual void operator++ ()
 move the iterator to the next Box in the layout
void incr ()
 move the iterator to the next Box in the layout
virtual 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 &a_boxlayout, const int *a_layoutID)

Protected Attributes

BoxLayout m_layout
unsigned int m_index
LayoutIndex m_current

Friends

class BoxLayout
class TimedDataIterator


Constructor & Destructor Documentation

LayoutIterator::LayoutIterator (  )  [inline]

a null constructed LayoutIterator will return false on ok()

virtual LayoutIterator::~LayoutIterator (  )  [inline, virtual]

LayoutIterator::LayoutIterator ( const BoxLayout a_boxlayout,
const int *  a_layoutID 
) [protected]


Member Function Documentation

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

return the index that this iterator is at

Reimplemented in DataIterator.

References m_current, and ok().

Referenced by i(), and DataIterator::operator()().

LayoutIndex LayoutIterator::i (  )  const [inline]

return a copy of the index that this iterator is at

Reimplemented in DataIterator.

References operator()().

void LayoutIterator::operator++ (  )  [inline, virtual]

move the iterator to the next Box in the layout

Reimplemented in TimedDataIterator.

References BoxLayout::m_boxes, m_current, LayoutIndex::m_index, m_index, m_layout, and ok().

void LayoutIterator::incr (  )  [inline]

move the iterator to the next Box in the layout

bool LayoutIterator::ok (  )  const [inline, virtual]

void LayoutIterator::begin (  )  [inline]

initialize this iterator to the first Box in its Layout

References BoxLayout::m_boxes, m_current, LayoutIndex::m_index, m_index, m_layout, and ok().

Referenced by MultilevelLinearOp< T >::dotProduct(), and regionGather().

void LayoutIterator::reset (  ) 

same as begin()

void LayoutIterator::end (  ) 

move this iterator to after the last Box in the layout

The iterator will be !ok() afterwards.


Friends And Related Function Documentation

friend class BoxLayout [friend]

Reimplemented in DataIterator, and TimedDataIterator.

friend class TimedDataIterator [friend]

Reimplemented in DataIterator.


Member Data Documentation

unsigned int LayoutIterator::m_index [protected]

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

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


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

Generated on Tue Apr 14 14:23:40 2009 for Chombo + EB by  doxygen 1.5.5