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

SgSideIterator Class Reference

Iterate through the two directions along the sides for the given point. More...

#include <SgBoardConst.h>

List of all members.

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

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 280 of file SgBoardConst.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


Member Data Documentation

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

Definition at line 312 of file SgBoardConst.h.

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


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


Sun Mar 13 2011 Doxygen 1.7.1