Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoAssertBoardRestored Class Reference

#include <GoAssertBoardRestored.h>

List of all members.


Detailed Description

Assert that the board has been restored to previous state.

Definition at line 13 of file GoAssertBoardRestored.h.

Public Member Functions

 GoAssertBoardRestored ()
 Constructor for later explicit call of Init().
 GoAssertBoardRestored (const GoBoard &bd)
 Constructor, calls Init().
 ~GoAssertBoardRestored ()
 Destructor, calls CheckRestored().
void AssertRestored ()
 Checks with assertions that the state of the board is the same as it was at the last call to Init() or the constructor.
void Init (const GoBoard &bd)
void Clear ()
 Set to a state, in which the destructor does not call AssertRestored() anymore.

Private Member Functions

 GoAssertBoardRestored (const GoAssertBoardRestored &)
 Not implemented.
GoAssertBoardRestoredoperator= (const GoAssertBoardRestored &)
 Not implemented.

Private Attributes

const GoBoardm_bd
int m_size
SgBlackWhite m_toPlay
SgHashCode m_hash
 Hash code for this board position.
int m_moveNumber
 Current move number.
SgBWArray< int > m_numStones
GoRules m_rules
bool m_allowKoRepetition
bool m_allowAnyRepetition
bool m_koModifiesHash
SgEmptyBlackWhite m_koColor
int m_koLevel
SgEmptyBlackWhite m_koLoser


Constructor & Destructor Documentation

GoAssertBoardRestored::GoAssertBoardRestored (  ) 

Constructor for later explicit call of Init().

Definition at line 75 of file GoAssertBoardRestored.h.

References m_bd.

GoAssertBoardRestored::GoAssertBoardRestored ( const GoBoard bd  ) 

Constructor, calls Init().

Definition at line 82 of file GoAssertBoardRestored.h.

References Init(), and SG_DEBUG_ONLY.

GoAssertBoardRestored::~GoAssertBoardRestored (  ) 

Destructor, calls CheckRestored().

Definition at line 90 of file GoAssertBoardRestored.h.

References AssertRestored().

GoAssertBoardRestored::GoAssertBoardRestored ( const GoAssertBoardRestored  )  [private]

Not implemented.


Member Function Documentation

void GoAssertBoardRestored::AssertRestored (  ) 

Checks with assertions that the state of the board is the same as it was at the last call to Init() or the constructor.

Definition at line 97 of file GoAssertBoardRestored.h.

References GoBoard::AnyRepetitionAllowed(), GoBoard::GetHashCode(), GoBoard::KoColor(), GoBoard::KoLevel(), GoBoard::KoLoser(), GoBoard::KoModifiesHash(), GoBoard::KoRepetitionAllowed(), m_allowAnyRepetition, m_allowKoRepetition, m_bd, m_hash, m_koColor, m_koLevel, m_koLoser, m_koModifiesHash, m_moveNumber, m_numStones, m_rules, m_size, m_toPlay, GoBoard::MoveNumber(), GoBoard::Rules(), SG_ASSERT, SG_BLACK, SG_WHITE, GoBoard::Size(), GoBoard::ToPlay(), and GoBoard::TotalNumStones().

Referenced by GoModBoard::Lock(), and ~GoAssertBoardRestored().

void GoAssertBoardRestored::Clear (  ) 

Set to a state, in which the destructor does not call AssertRestored() anymore.

Definition at line 118 of file GoAssertBoardRestored.h.

References m_bd.

Referenced by GoModBoard::Lock().

void GoAssertBoardRestored::Init ( const GoBoard bd  ) 

Definition at line 125 of file GoAssertBoardRestored.h.

References GoBoard::AnyRepetitionAllowed(), GoBoard::GetHashCode(), GoBoard::KoColor(), GoBoard::KoLevel(), GoBoard::KoLoser(), GoBoard::KoModifiesHash(), GoBoard::KoRepetitionAllowed(), m_allowAnyRepetition, m_allowKoRepetition, m_bd, m_hash, m_koColor, m_koLevel, m_koLoser, m_koModifiesHash, m_moveNumber, m_numStones, m_rules, m_size, m_toPlay, GoBoard::MoveNumber(), GoBoard::Rules(), SG_DEBUG_ONLY, GoBoard::Size(), GoBoard::ToPlay(), and GoBoard::TotalNumStones().

Referenced by GoAssertBoardRestored(), and GoModBoard::Unlock().

GoAssertBoardRestored& GoAssertBoardRestored::operator= ( const GoAssertBoardRestored  )  [private]

Not implemented.


Member Data Documentation

bool GoAssertBoardRestored::m_allowAnyRepetition [private]

Definition at line 57 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

bool GoAssertBoardRestored::m_allowKoRepetition [private]

Definition at line 55 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

const GoBoard* GoAssertBoardRestored::m_bd [private]

Definition at line 39 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), Clear(), GoAssertBoardRestored(), and Init().

SgHashCode GoAssertBoardRestored::m_hash [private]

Hash code for this board position.

Definition at line 46 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

SgEmptyBlackWhite GoAssertBoardRestored::m_koColor [private]

Definition at line 61 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

int GoAssertBoardRestored::m_koLevel [private]

Definition at line 63 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

SgEmptyBlackWhite GoAssertBoardRestored::m_koLoser [private]

Definition at line 65 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

bool GoAssertBoardRestored::m_koModifiesHash [private]

Definition at line 59 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

int GoAssertBoardRestored::m_moveNumber [private]

Current move number.

Definition at line 49 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

SgBWArray<int> GoAssertBoardRestored::m_numStones [private]

Definition at line 51 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

GoRules GoAssertBoardRestored::m_rules [private]

Definition at line 53 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

int GoAssertBoardRestored::m_size [private]

Definition at line 41 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().

SgBlackWhite GoAssertBoardRestored::m_toPlay [private]

Definition at line 43 of file GoAssertBoardRestored.h.

Referenced by AssertRestored(), and Init().


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


17 Jun 2010 Doxygen 1.4.7