Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoBoard::StoneIterator Class Reference

#include <GoBoard.h>

List of all members.


Detailed Description

Iterate through all the stones of a block.

Point 'p' must be occupied. Also, the stones can only be accessed for the current board position.

Definition at line 941 of file GoBoard.h.

Public Member Functions

 StoneIterator (const GoBoard &bd, SgPoint p)
void operator++ ()
 Advance the state of the iteration to the next stone.
SgPoint operator * () const
 Return the current stone.
 operator bool () const
 Return true if iteration is valid, otherwise false.

Private Member Functions

 StoneIterator (const StoneIterator &)
 Not implemented.
StoneIteratoroperator= (const StoneIterator &)
 Not implemented.

Private Attributes

GoBoard::Block::StoneIterator m_it
 Iterator over original list in GoBoard::Block::StoneList.
const GoBoardm_board
uint64_t m_countPlay


Constructor & Destructor Documentation

GoBoard::StoneIterator::StoneIterator ( const GoBoard bd,
SgPoint  p 
)

Definition at line 1065 of file GoBoard.h.

References GoBoard::CountPlay(), m_board, m_countPlay, GoBoard::Occupied(), and SG_ASSERT.

GoBoard::StoneIterator::StoneIterator ( const StoneIterator  )  [private]

Not implemented.


Member Function Documentation

SgPoint GoBoard::StoneIterator::operator * (  )  const

Return the current stone.

Definition at line 1080 of file GoBoard.h.

References GoBoard::CountPlay(), m_board, m_countPlay, m_it, and SG_ASSERT.

GoBoard::StoneIterator::operator bool (  )  const

Return true if iteration is valid, otherwise false.

Definition at line 1086 of file GoBoard.h.

References m_it.

void GoBoard::StoneIterator::operator++ (  ) 

Advance the state of the iteration to the next stone.

Definition at line 1075 of file GoBoard.h.

References m_it.

StoneIterator& GoBoard::StoneIterator::operator= ( const StoneIterator  )  [private]

Not implemented.


Member Data Documentation

const GoBoard& GoBoard::StoneIterator::m_board [private]

Definition at line 964 of file GoBoard.h.

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

uint64_t GoBoard::StoneIterator::m_countPlay [private]

Definition at line 967 of file GoBoard.h.

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

GoBoard::Block::StoneIterator GoBoard::StoneIterator::m_it [private]

Iterator over original list in GoBoard::Block::StoneList.

No copy of list is necessary, even if moves are played and undone while iterating over the list, since the implementation of GoBoard does guarantee that the order of the block's stone list is preserved.

Definition at line 962 of file GoBoard.h.

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


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


17 Jun 2010 Doxygen 1.4.7