Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

SgSideIterator Class Reference

#include <SgBoardConst.h>

List of all members.


Detailed Description

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 292 of file 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.
SgSideIteratoroperator= (const SgSideIterator &)
 Not implemented.

Private Attributes

const SgBoardConstm_boardConst
SgPoint m_p
int m_index


Constructor & Destructor Documentation

SgSideIterator::SgSideIterator ( const SgBoardConst boardConst,
SgPoint  p 
)

Definition at line 295 of file SgBoardConst.h.

References m_boardConst, m_p, SG_ASSERT, and SgBoardConst::Side().

SgSideIterator::SgSideIterator ( const SgSideIterator  )  [private]

Not implemented.


Member Function Documentation

int SgSideIterator::operator * (  )  const

Return the value of the current element.

Definition at line 310 of file SgBoardConst.h.

References m_boardConst, m_index, m_p, and SgBoardConst::Side().

SgSideIterator::operator bool (  )  const

Return true if iteration is valid, otherwise false.

Definition at line 316 of file SgBoardConst.h.

References m_index.

void SgSideIterator::operator++ (  ) 

Advance the state of the iteration to the next element.

Definition at line 304 of file SgBoardConst.h.

References m_index.

SgSideIterator& SgSideIterator::operator= ( const SgSideIterator  )  [private]

Not implemented.


Member Data Documentation

const SgBoardConst& SgSideIterator::m_boardConst [private]

Definition at line 322 of file SgBoardConst.h.

Referenced by operator *(), and SgSideIterator().

int SgSideIterator::m_index [private]

Definition at line 326 of file SgBoardConst.h.

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

SgPoint SgSideIterator::m_p [private]

Definition at line 324 of file SgBoardConst.h.

Referenced by operator *(), and SgSideIterator().


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


17 Jun 2010 Doxygen 1.4.7