Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoBoard::LibertyIterator Class Reference

#include <GoBoard.h>

List of all members.


Detailed Description

Iterate through all the liberties of a block.

Point 'p' must be occupied. Liberties should only be accessed for the current board position. No moves are allowed to be executed during the iteration.

Definition at line 990 of file GoBoard.h.

Public Member Functions

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

Private Member Functions

 LibertyIterator (const LibertyIterator &)
 Not implemented.
LibertyIteratoroperator= (const LibertyIterator &)
 Not implemented.

Private Attributes

Block::LibertyList::Iterator m_it
const GoBoardm_board
uint64_t m_countPlay


Constructor & Destructor Documentation

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

Definition at line 1097 of file GoBoard.h.

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

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

Not implemented.


Member Function Documentation

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

Return the current liberty.

Definition at line 1112 of file GoBoard.h.

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

GoBoard::LibertyIterator::operator bool (  )  const

Return true if iteration is valid, otherwise false.

Definition at line 1118 of file GoBoard.h.

References m_it.

void GoBoard::LibertyIterator::operator++ (  ) 

Advance the state of the iteration to the next liberty.

Definition at line 1107 of file GoBoard.h.

References m_it.

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

Not implemented.


Member Data Documentation

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

Definition at line 1007 of file GoBoard.h.

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

uint64_t GoBoard::LibertyIterator::m_countPlay [private]

Definition at line 1010 of file GoBoard.h.

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

Block::LibertyList::Iterator GoBoard::LibertyIterator::m_it [private]

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