#include <stencil2D.h>
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. |
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.
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().
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.
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.
other | This argument is the StencilIterator instance to which *this should be compared. |
Definition at line 70 of file stencil2D.h.
References dlr::numeric::StencilIterator< Type, Size >::m_ptr.
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.
Definition at line 155 of file stencil2D.h.
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.
Definition at line 109 of file stencil2D.h.
StencilIterator<Type, Size>& dlr::numeric::StencilIterator< Type, Size >::operator++ | ( | ) | [inline] |
The pre-increment operator moves the iterator to the next element in the sequence.
Definition at line 98 of file stencil2D.h.
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.
Definition at line 134 of file stencil2D.h.
StencilIterator<Type, Size>& dlr::numeric::StencilIterator< Type, Size >::operator-- | ( | ) | [inline] |
The pre-decrement operator moves the iterator to the previous element in the sequence.
Definition at line 123 of file stencil2D.h.
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();
Definition at line 170 of file stencil2D.h.
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.
other | This argument is the StencilIterator instance to which *this should be compared. |
Definition at line 86 of file stencil2D.h.
References dlr::numeric::StencilIterator< Type, Size >::m_ptr.