golib
0.5
|
Iterator for goSignal3DBase<T> class signals. More...
#include <gosignal3diterator.h>
Public Member Functions | |
goSignal3DIterator (goSignal3DBase< T > *s) | |
goSignal3DIterator (const goSignal3DIterator &other) | |
void | setPosition (goIndex_t x, goIndex_t y, goIndex_t z) |
bool | endX () |
bool | endY () |
bool | endZ () |
void | incrementX () |
void | incrementY () |
void | incrementZ () |
void | decrementX () |
void | decrementY () |
void | decrementZ () |
void | resetX () |
void | resetY () |
void | resetZ () |
T * | operator* () |
const T * | operator* () const |
Public Attributes | |
goSignal3DBase< T > * | sig |
goPtrdiff_t * | dx |
goPtrdiff_t * | dy |
goPtrdiff_t * | dz |
T * | px |
T * | py |
T * | pz |
goIndex_t | posX |
goIndex_t | posY |
goIndex_t | posZ |
goIndex_t | maxX |
goIndex_t | maxY |
goIndex_t | maxZ |
Iterator for goSignal3DBase<T> class signals.
This is an iterator class for signals. Please refrain from using special type goSignal3DBase if you don't absolutely have to (I don't see why). Use goSignal3DBase<void> and goSignal3DGenericIterator instead or code your own loops.
Usage is like this:
goSignal3D<goInt16> sig;
....
goSignal3D<goInt16>::iterator it(&sig);
while (!it.endZ())
{
it.resetY();
while (!it.endY())
{
it.resetX();
while (!it.endX())
{
**it = // ... do something
it.incrementX();
}
it.incrementY();
}
it.incrementZ();
}