Iterate through the two directions along the sides for the given point. More...
#include <SgBoardConst.h>
Public Member Functions | |
SgSideIterator (const SgBoardConst &boardConst, SgPoint p) | |
void | operator++ () |
Advance the state of the iteration to the next element. | |
int | operator* () const |
Return the value of the current element. | |
operator bool () const | |
Return true if iteration is valid, otherwise false. | |
Private Member Functions | |
SgSideIterator (const SgSideIterator &) | |
Not implemented. | |
SgSideIterator & | operator= (const SgSideIterator &) |
Not implemented. | |
Private Attributes | |
const SgBoardConst & | m_boardConst |
SgPoint | m_p |
int | m_index |
Iterate through the two directions along the sides for the given point.
Returns the offset to the left (clockwise) first, then to the right.
Definition at line 280 of file SgBoardConst.h.
SgSideIterator::SgSideIterator | ( | const SgBoardConst & | boardConst, | |
SgPoint | p | |||
) |
Definition at line 283 of file SgBoardConst.h.
References m_boardConst, m_p, SG_ASSERT, and SgBoardConst::Side().
SgSideIterator::SgSideIterator | ( | const SgSideIterator & | ) | [private] |
Not implemented.
SgSideIterator::operator bool | ( | ) | const |
Return true if iteration is valid, otherwise false.
Definition at line 304 of file SgBoardConst.h.
References m_index.
int SgSideIterator::operator* | ( | ) | const |
Return the value of the current element.
Definition at line 298 of file SgBoardConst.h.
References m_boardConst, m_index, m_p, and SgBoardConst::Side().
void SgSideIterator::operator++ | ( | ) |
Advance the state of the iteration to the next element.
Definition at line 292 of file SgBoardConst.h.
References m_index.
SgSideIterator& SgSideIterator::operator= | ( | const SgSideIterator & | ) | [private] |
Not implemented.
const SgBoardConst& SgSideIterator::m_boardConst [private] |
Definition at line 310 of file SgBoardConst.h.
Referenced by operator*(), and SgSideIterator().
int SgSideIterator::m_index [private] |
Definition at line 314 of file SgBoardConst.h.
Referenced by operator bool(), operator*(), and operator++().
SgPoint SgSideIterator::m_p [private] |
Definition at line 312 of file SgBoardConst.h.
Referenced by operator*(), and SgSideIterator().