Iterate through all 8-connected components of a given set. More...
#include <SgConnCompIterator.h>
Public Member Functions | |
SgConnComp8Iterator (const SgPointSet &set, int boardSize) | |
Create an iterator to iterate through set on 'board'. | |
void | operator++ () |
const SgPointSet & | operator* () const |
operator bool () const | |
Private Attributes | |
SgPointSet | m_set |
SgPointSet | m_nextSet |
int | m_nextPoint |
int | m_lastBoardPoint |
Iterate through all 8-connected components of a given set.
Definition at line 49 of file SgConnCompIterator.h.
SgConnComp8Iterator::SgConnComp8Iterator | ( | const SgPointSet & | set, | |
int | boardSize | |||
) |
Create an iterator to iterate through set on 'board'.
Definition at line 41 of file SgConnCompIterator.cpp.
References operator++(), SG_ASSERTRANGE, and SG_MAX_SIZE.
SgConnComp8Iterator::operator bool | ( | ) | const |
Definition at line 59 of file SgConnCompIterator.h.
References m_lastBoardPoint, and m_nextPoint.
const SgPointSet & SgConnComp8Iterator::operator* | ( | ) | const |
Definition at line 62 of file SgConnCompIterator.cpp.
References m_lastBoardPoint, m_nextPoint, m_nextSet, and SG_ASSERT.
void SgConnComp8Iterator::operator++ | ( | ) |
Definition at line 50 of file SgConnCompIterator.cpp.
References SgPointSet::ConnComp8(), m_lastBoardPoint, m_nextPoint, m_nextSet, and m_set.
Referenced by SgConnComp8Iterator().
int SgConnComp8Iterator::m_lastBoardPoint [private] |
Definition at line 71 of file SgConnCompIterator.h.
Referenced by operator bool(), operator*(), and operator++().
int SgConnComp8Iterator::m_nextPoint [private] |
Definition at line 69 of file SgConnCompIterator.h.
Referenced by operator bool(), operator*(), and operator++().
SgPointSet SgConnComp8Iterator::m_nextSet [private] |
Definition at line 67 of file SgConnCompIterator.h.
Referenced by operator*(), and operator++().
SgPointSet SgConnComp8Iterator::m_set [private] |
Definition at line 65 of file SgConnCompIterator.h.
Referenced by operator++().