Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  
Public Member Functions | Private Attributes

SgRectIterator Class Reference

Iterator for rectangle on the Go board, based on SgRect object. More...

#include <SgRect.h>

List of all members.

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 SgRectm_rect
SgPoint m_cursor
SgPoint m_end

Detailed Description

Iterator for rectangle on the Go board, based on SgRect object.

Definition at line 187 of file SgRect.h.


Constructor & Destructor Documentation

SgRectIterator::SgRectIterator ( const SgRect rect  ) 

Definition at line 191 of file SgRect.h.


Member Function Documentation

SgRectIterator::operator bool (  )  const

Return true if iteration is valid, otherwise false.

Definition at line 214 of file SgRect.h.

References m_cursor, and m_end.

SgPoint SgRectIterator::operator* (  )  const

Return the value of the current element.

Definition at line 208 of file SgRect.h.

References m_cursor.

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.


Member Data Documentation

Definition at line 222 of file SgRect.h.

Referenced by operator bool(), operator*(), and operator++().

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++().


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


Sun Mar 13 2011 Doxygen 1.7.1