BLIterator Class Reference

#include <BLIterator.H>

List of all members.


Detailed Description

Iterator for the BoxLayout class. Used to iterate through the Points in bit space associated with patches of the domain.

Used to iterate through the Points in bit space associated with patches of the domain.

Example usage:

  BoxLayout layout;
  // ... layout is constructed ...
  Point pi; Box bi;
  for (BLIterator iter(layout); iter != iter.end(); ++iter) {
  // access current Point:
  pi = (*iter);
  // access current Patch:
  bi = layout[*iter];
  // ... do things ...
  }

Public Member Functions

 BLIterator ()
 Default Constructor.
 BLIterator (const BoxLayout &a_boxLayout)
 Create a BLIterator from a BoxLayout.
 ~BLIterator ()
 Destructor.
BLIteratoroperator++ ()
 Definition of increment operator.
Pointoperator* ()
 Definition of "*" operator.
int operator() ()
 Returns the linear index of the point in m_boxLayout associated with *this.
bool operator!= (BLIterator a_other)
 Equality test for BLIterator objects.
BLIterator begin ()
 Returns a BLIterator pointing to the first Point in m_boxLayout.
BLIterator end ()
 Returns a BLIterator pointing to a Point outside m_boxLayout.

Private Member Functions

 BLIterator (const BoxLayout &a_boxLayout, const Point &a_point)
 Create a BLIterator from a BoxLayout starting from a user defined Point in bit-space.

Private Attributes

BoxLayout m_boxLayout
 BoxLayout object associated with *this.
Point m_data
 Current iterant. Data is a Point in bit-space representing (the lowCorner of) a patch in the BoxLayout domain.
std::vector< Point >::iterator m_vectorIterator
 An object used to iterate through a vector<Point> object.

Constructor & Destructor Documentation

BLIterator::BLIterator (  ) 

Default Constructor.

BLIterator::BLIterator ( const BoxLayout a_boxLayout  ) 

Create a BLIterator from a BoxLayout.

BLIterator::~BLIterator (  ) 

Destructor.

BLIterator::BLIterator ( const BoxLayout a_boxLayout,
const Point a_point 
) [private]

Create a BLIterator from a BoxLayout starting from a user defined Point in bit-space.

Only used internally by end(), and does not create a legitimate BLIterator. Possibly unnecessary.


Member Function Documentation

BLIterator& BLIterator::operator++ (  ) 

Definition of increment operator.

Point& BLIterator::operator* (  ) 

Definition of "*" operator.

int BLIterator::operator() (  )  [inline]

Returns the linear index of the point in m_boxLayout associated with *this.

References BoxLayout::getPatchIndex(), and m_boxLayout.

bool BLIterator::operator!= ( BLIterator  a_other  ) 

Equality test for BLIterator objects.

BLIterator BLIterator::begin (  ) 

Returns a BLIterator pointing to the first Point in m_boxLayout.

Referenced by LevelData< T, C, D, E >::copyTo(), and LevelData< T, C, D, E >::setVal().

BLIterator BLIterator::end (  ) 

Returns a BLIterator pointing to a Point outside m_boxLayout.

This method should only be used to check if we're done in a for-loop.

Referenced by LevelData< T, C, D, E >::copyTo(), and LevelData< T, C, D, E >::setVal().


Member Data Documentation

BoxLayout object associated with *this.

Referenced by operator()().

Current iterant. Data is a Point in bit-space representing (the lowCorner of) a patch in the BoxLayout domain.

std::vector<Point>::iterator BLIterator::m_vectorIterator [private]

An object used to iterate through a vector<Point> object.


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

Generated on Fri Mar 11 12:53:44 2016 for AMRStencil by  doxygen 1.5.5