Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgRectIterator Class Reference

#include <SgRect.h>

List of all members.


Detailed Description

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

Definition at line 190 of file 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 SgRectm_rect
SgPoint m_cursor
SgPoint m_end


Constructor & Destructor Documentation

SgRectIterator::SgRectIterator ( const SgRect rect  ) 

Definition at line 194 of file SgRect.h.


Member Function Documentation

SgPoint SgRectIterator::operator * (  )  const

Return the value of the current element.

Definition at line 211 of file SgRect.h.

References m_cursor.

SgRectIterator::operator bool (  )  const

Return true if iteration is valid, otherwise false.

Definition at line 217 of file SgRect.h.

References m_cursor, and m_end.

void SgRectIterator::operator++ (  ) 

Iterate through rectangle: left to right, top to bottom.

Definition at line 201 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

SgPoint SgRectIterator::m_cursor [private]

Definition at line 225 of file SgRect.h.

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

SgPoint SgRectIterator::m_end [private]

Definition at line 227 of file SgRect.h.

Referenced by operator bool().

const SgRect& SgRectIterator::m_rect [private]

Definition at line 223 of file SgRect.h.

Referenced by operator++().


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


17 Jun 2010 Doxygen 1.4.7