Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoUctBoard::LibertyIterator Class Reference

#include <GoUctBoard.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 429 of file GoUctBoard.h.

Public Member Functions

 LibertyIterator (const GoUctBoard &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

GoUctBoard::Block::LibertyList::Iterator m_it
const GoUctBoardm_board


Constructor & Destructor Documentation

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

Definition at line 497 of file GoUctBoard.h.

References m_board, GoUctBoard::Occupied(), and SG_ASSERT.

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

Not implemented.


Member Function Documentation

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

Return the current liberty.

Definition at line 510 of file GoUctBoard.h.

References m_it.

GoUctBoard::LibertyIterator::operator bool (  )  const

Return true if iteration is valid, otherwise false.

Definition at line 515 of file GoUctBoard.h.

References m_it.

void GoUctBoard::LibertyIterator::operator++ (  ) 

Advance the state of the iteration to the next liberty.

Definition at line 505 of file GoUctBoard.h.

References m_it.

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

Not implemented.


Member Data Documentation

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

Definition at line 446 of file GoUctBoard.h.

Referenced by LibertyIterator().

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

Definition at line 444 of file GoUctBoard.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