#include <Matrix.h>
Public Types | |
typedef Matrix::SizeType | SizeType |
Size type of the array (width / height / indexes). | |
Public Member Functions | |
iterator (const Matrix *matrix, SizeType xIndex=0, SizeType yIndex=0) | |
Constructor. | |
iterator (const iterator &iter) | |
Copy constructor. | |
~iterator () | |
Destructor. | |
Object & | operator * () |
Dereferences the iterator. | |
Object * | operator-> () |
Dereferences the iterator. | |
iterator & | operator++ () |
Moves iterator to the next place (prefix). | |
iterator | operator++ (int) |
Moves iterator to the next place (postfix). | |
iterator & | operator= (const iterator &iter) |
Assignment of two iterators. | |
Private Attributes | |
const Matrix * | m |
Matrix into which the iterator is pointed. | |
SizeType | x |
[x][] index | |
SizeType | y |
[][y] index | |
Friends | |
bool | operator== (const iterator &iter1, const iterator &iter2) |
Returns true if the two selected iterators points to the same place. | |
bool | operator!= (const iterator &iter1, const iterator &iter2) |
Returns true if the two selected iterators doesn't point to the same place. |
Size type of the array (width / height / indexes).
Matrix::iterator::iterator | ( | const Matrix * | matrix, | |
SizeType | xIndex = 0 , |
|||
SizeType | yIndex = 0 | |||
) | [inline] |
Constructor.
matrix | Matrix into which the iterator is pointed | |
xIndex | Index x | |
yIndex | Index y |
Matrix::iterator::iterator | ( | const iterator & | iter | ) | [inline] |
Copy constructor.
iter | Iterator to be copied |
Matrix::iterator::~iterator | ( | ) | [inline] |
Destructor.
Object & Matrix::iterator::operator * | ( | ) |
Dereferences the iterator.
Matrix::iterator Matrix::iterator::operator++ | ( | int | ) |
Moves iterator to the next place (postfix).
Note: Prefix variant is more effective.
Matrix::iterator & Matrix::iterator::operator++ | ( | ) |
Moves iterator to the next place (prefix).
Object * Matrix::iterator::operator-> | ( | ) |
Dereferences the iterator.
Matrix::iterator & Matrix::iterator::operator= | ( | const iterator & | iter | ) |
Assignment of two iterators.
iter | Iterator to be assigned |
Returns true if the two selected iterators doesn't point to the same place.
iter1 | First iterator | |
iter2 | Second iterator |
Returns true if the two selected iterators points to the same place.
iter1 | First iterator | |
iter2 | Second iterator |
const Matrix* Matrix::iterator::m [private] |
Matrix into which the iterator is pointed.
SizeType Matrix::iterator::x [private] |
[x][] index
SizeType Matrix::iterator::y [private] |
[][y] index