dlr::numeric::StencilIterator< Type, Size > Class Template Reference

WARNING: This class is still under development and quite unstable. More...

#include <stencil2D.h>

List of all members.

Public Member Functions

 StencilIterator (Type *ptr, int *incrementPtr, size_t position=0)
 This constructor is called by Stencil2D when creating a StencilIterator instance to return from Stencil2D::begin() or Stencil2D::end().
bool operator!= (const StencilIterator< Type, Size > &other)
 This operator returns true if its argument refers to a different memory location *this.
bool operator== (const StencilIterator< Type, Size > &other)
 This operator returns true if its argument refers to the same memory location *this.
StencilIterator< Type, Size > & operator++ ()
 The pre-increment operator moves the iterator to the next element in the sequence.
StencilIterator< Type, Size > operator++ (int)
 The post-increment operator is just like the pre-increment operator, above, but returns a copy of the StencilIterator which has not been incremented.
StencilIterator< Type, Size > & operator-- ()
 The pre-decrement operator moves the iterator to the previous element in the sequence.
StencilIterator< Type, Size > operator-- (int)
 The post-decrement operator is just like the pre-decrement operator, above, but returns a copy of the StencilIterator which has not been decremented.
Type & operator* ()
 The dereference operator permits reading and writing the value to which this StencilIterator instance currently points.
Type * operator-> ()
 The access operator allows you to access the member functions and member variables of the value to which this StencilIterator instance currently points, just as you would with a normal pointer.


Detailed Description

template<class Type, int Size>
class dlr::numeric::StencilIterator< Type, Size >

WARNING: This class is still under development and quite unstable.

Use at your own risk.

This iterator class allows STL-style interaction with the array elements slected by a stencil. For more information, please see the documentation for class Stencil2D.

Definition at line 35 of file stencil2D.h.


Constructor & Destructor Documentation

template<class Type, int Size>
dlr::numeric::StencilIterator< Type, Size >::StencilIterator ( Type *  ptr,
int *  incrementPtr,
size_t  position = 0 
) [inline]

This constructor is called by Stencil2D when creating a StencilIterator instance to return from Stencil2D::begin() or Stencil2D::end().

Parameters:
ptr This argument is a pointer to the data of the underlying array.
incrementPtr This argument is a pointer to a C-style array of spacings between subsequent stencil elements. Adding these numbers to ptr will cause ptr to point to each stencil element in turn.
position This argument

Definition at line 54 of file stencil2D.h.


Member Function Documentation

template<class Type, int Size>
bool dlr::numeric::StencilIterator< Type, Size >::operator!= ( const StencilIterator< Type, Size > &  other  )  [inline]

This operator returns true if its argument refers to a different memory location *this.

Parameters:
other This argument is the StencilIterator instance to which *this should be compared.
Returns:
The return value is true if the two StencilIterator instances refer to diferent referents, false otherwise.

Definition at line 70 of file stencil2D.h.

References dlr::numeric::StencilIterator< Type, Size >::m_ptr.

template<class Type, int Size>
Type& dlr::numeric::StencilIterator< Type, Size >::operator* (  )  [inline]

The dereference operator permits reading and writing the value to which this StencilIterator instance currently points.

For example, you might write:

StencilIterator<char, 10> ptr(...); char ch = *ptr;

just as you would with a native pointer type.

Returns:
Reference to the value to which this StencilIterator instance currently points.

Definition at line 155 of file stencil2D.h.

template<class Type, int Size>
StencilIterator<Type, Size> dlr::numeric::StencilIterator< Type, Size >::operator++ ( int   )  [inline]

The post-increment operator is just like the pre-increment operator, above, but returns a copy of the StencilIterator which has not been incremented.

Returns:
An un-incremented copy of *this.

Definition at line 109 of file stencil2D.h.

template<class Type, int Size>
StencilIterator<Type, Size>& dlr::numeric::StencilIterator< Type, Size >::operator++ (  )  [inline]

The pre-increment operator moves the iterator to the next element in the sequence.

Returns:
A reference to the incremented StencilIterator instance.

Definition at line 98 of file stencil2D.h.

template<class Type, int Size>
StencilIterator<Type, Size> dlr::numeric::StencilIterator< Type, Size >::operator-- ( int   )  [inline]

The post-decrement operator is just like the pre-decrement operator, above, but returns a copy of the StencilIterator which has not been decremented.

Returns:
An un-decremented copy of *this.

Definition at line 134 of file stencil2D.h.

template<class Type, int Size>
StencilIterator<Type, Size>& dlr::numeric::StencilIterator< Type, Size >::operator-- (  )  [inline]

The pre-decrement operator moves the iterator to the previous element in the sequence.

Returns:
A reference to the decremented StencilIterator instance.

Definition at line 123 of file stencil2D.h.

template<class Type, int Size>
Type* dlr::numeric::StencilIterator< Type, Size >::operator-> (  )  [inline]

The access operator allows you to access the member functions and member variables of the value to which this StencilIterator instance currently points, just as you would with a normal pointer.

Use it like this:

StencilIterator<MyClass, 10> ptr(...); ptr->someMethod();

Returns:
C-style pointer to the value pointed to by this StencilIterator instance.

Definition at line 170 of file stencil2D.h.

template<class Type, int Size>
bool dlr::numeric::StencilIterator< Type, Size >::operator== ( const StencilIterator< Type, Size > &  other  )  [inline]

This operator returns true if its argument refers to the same memory location *this.

Parameters:
other This argument is the StencilIterator instance to which *this should be compared.
Returns:
The return value is true if the two StencilIterator instances refer to the same referents, false otherwise.

Definition at line 86 of file stencil2D.h.

References dlr::numeric::StencilIterator< Type, Size >::m_ptr.


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

Generated on Wed Nov 25 00:42:49 2009 for dlrUtilities Utility Library by  doxygen 1.5.8