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

GoBoard::LibertyIterator Class Reference

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

#include <GoBoard.h>

List of all members.

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

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


Constructor & Destructor Documentation

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

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

GoBoard::LibertyIterator::operator bool (  )  const

Return true if iteration is valid, otherwise false.

Definition at line 1051 of file GoBoard.h.

References m_it.

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

Return the current liberty.

Definition at line 1045 of file GoBoard.h.

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

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

Advance the state of the iteration to the next liberty.

Definition at line 1040 of file GoBoard.h.

References m_it.

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

Not implemented.


Member Data Documentation

Definition at line 942 of file GoBoard.h.

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

Definition at line 945 of file GoBoard.h.

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

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

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