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

GoBoard::StoneIterator Class Reference

Iterate through all the stones of a block. More...

#include <GoBoard.h>

List of all members.

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

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 878 of file GoBoard.h.


Constructor & Destructor Documentation

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

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

GoBoard::StoneIterator::operator bool (  )  const

Return true if iteration is valid, otherwise false.

Definition at line 1019 of file GoBoard.h.

References m_it.

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

Return the current stone.

Definition at line 1013 of file GoBoard.h.

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

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

Advance the state of the iteration to the next stone.

Definition at line 1008 of file GoBoard.h.

References m_it.

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

Not implemented.


Member Data Documentation

Definition at line 900 of file GoBoard.h.

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

Definition at line 903 of file GoBoard.h.

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

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 898 of file GoBoard.h.

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


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


Sun Mar 13 2011 Doxygen 1.7.1