WritableField< Data_T >::iterator Class Reference

`#include <Field.h>`

## Public Member Functions

| iterator (WritableField< Data_T > &field, const Box3i &window, const V3i &currentPos)
template<class Iter_T>
bool | operator!= (const Iter_T &rhs) const
Data_T & | operator* () const
const iterator & | operator++ ()
template<class Iter_T>
bool | operator== (const Iter_T &rhs) const

## Public Attributes

int | x
| Current position.
int | y
int | z

## Private Attributes

WritableField< Data_T > & | m_field
| Reference to field being iterated over.
Box3i | m_window
| Window to traverse.

## Detailed Description

template<class Data_T>
class WritableField< Data_T >::iterator

Definition at line 703 of file Field.h.

## Constructor & Destructor Documentation

## iterator()

template<class Data_T>

WritableField< Data_T >::iterator::iterator | ( | WritableField< Data_T > & | field,
|  | const Box3i & | window,
|  | const V3i & | currentPos )

inline

Definition at line 717 of file Field.h.

: x(currentPos.x), y(currentPos.y), z(currentPos.z),
m_window(window), m_field(field)
{ }
WritableField::iterator::y
int y
Definition Field.h:762
WritableField::iterator::m_window
Box3i m_window
Window to traverse.
Definition Field.h:769
WritableField::iterator::z
int z
Definition Field.h:762
WritableField::iterator::x
int x
Current position.
Definition Field.h:762
WritableField::iterator::m_field
WritableField< Data_T > & m_field
Reference to field being iterated over.
Definition Field.h:771
WritableField
Definition Field.h:625

References m_field, m_window, x, y, and z.

Referenced by operator++().

## Member Function Documentation

## operator++()

template<class Data_T>

const iterator & WritableField< Data_T >::iterator::operator++ | ( |  | ) |

inline

Definition at line 725 of file Field.h.

{
if (x == m_window.max.x) {
if (y == m_window.max.y) {
x = m_window.min.x;
y = m_window.min.y;
++z;
} else {
x = m_window.min.x;
++y;
}
} else {
++x;
}
return *this;
}

References iterator(), m_window, x, y, and z.

## operator==()

template<class Data_T>
template<class Iter_T>

bool WritableField< Data_T >::iterator::operator== | ( | const Iter_T & | rhs | ) | const

inline

Definition at line 743 of file Field.h.

{
return x == rhs.x && y == rhs.y && z == rhs.z;
}

References x, y, and z.

## operator!=()

template<class Data_T>
template<class Iter_T>

bool WritableField< Data_T >::iterator::operator!= | ( | const Iter_T & | rhs | ) | const

inline

Definition at line 749 of file Field.h.

{
return x != rhs.x || y != rhs.y || z != rhs.z;
}

References x, y, and z.

## operator*()

template<class Data_T>

Data_T & WritableField< Data_T >::iterator::operator* | ( |  | ) | const

inline

Definition at line 754 of file Field.h.

{
return m_field.lvalue(x, y, z);
}

References m_field, x, y, and z.

## Member Data Documentation

## x

template<class Data_T>

int WritableField< Data_T >::iterator::x

Current position.

Definition at line 762 of file Field.h.

Referenced by iterator(), operator!=(), operator*(), operator++(), and operator==().

## y

template<class Data_T>

int WritableField< Data_T >::iterator::y

Definition at line 762 of file Field.h.

Referenced by iterator(), operator!=(), operator*(), operator++(), and operator==().

## z

template<class Data_T>

int WritableField< Data_T >::iterator::z

Definition at line 762 of file Field.h.

Referenced by iterator(), operator!=(), operator*(), operator++(), and operator==().

## m_window

template<class Data_T>

Box3i WritableField< Data_T >::iterator::m_window

private

Window to traverse.

Definition at line 769 of file Field.h.

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

## m_field

template<class Data_T>

WritableField<Data_T>& WritableField< Data_T >::iterator::m_field

private

Reference to field being iterated over.

Definition at line 771 of file Field.h.

Referenced by iterator(), and operator*().

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

- export/Field.h