Iterator for rectangle on the Go board, based on SgRect object. More...
#include <SgRect.h>
Public Member Functions | |
SgRectIterator (const SgRect &rect) | |
void | operator++ () |
Iterate through rectangle: left to right, top to bottom. | |
SgPoint | operator* () const |
Return the value of the current element. | |
operator bool () const | |
Return true if iteration is valid, otherwise false. | |
Private Attributes | |
const SgRect & | m_rect |
SgPoint | m_cursor |
SgPoint | m_end |
Iterator for rectangle on the Go board, based on SgRect object.
Definition at line 187 of file SgRect.h.
SgRectIterator::operator bool | ( | ) | const |
SgPoint SgRectIterator::operator* | ( | ) | const |
void SgRectIterator::operator++ | ( | ) |
Iterate through rectangle: left to right, top to bottom.
Definition at line 198 of file SgRect.h.
References SgPointUtil::Col(), SgRect::Contains(), SgRect::Left(), m_cursor, m_rect, SgRect::Right(), SG_ASSERT, SG_NS, and SG_WE.
SgPoint SgRectIterator::m_cursor [private] |
Definition at line 222 of file SgRect.h.
Referenced by operator bool(), operator*(), and operator++().
SgPoint SgRectIterator::m_end [private] |
Definition at line 224 of file SgRect.h.
Referenced by operator bool().
const SgRect& SgRectIterator::m_rect [private] |
Definition at line 220 of file SgRect.h.
Referenced by operator++().