Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoRestoreRepetitionAndSuicide Class Reference

#include <GoBoardUtil.h>

List of all members.


Detailed Description

Used to alter state of repetition and self-removal for certain periods of play.

Restores the settings to the previous values in an exception-safe way. To use it, just declare a RestoreRepetitionAndRemoval variable on the stack for the desired scope.

Definition at line 1056 of file GoBoardUtil.h.

Public Member Functions

 GoRestoreRepetitionAndSuicide (GoBoard &board, bool allowAnyRepetition, bool allowKoRepetition, bool allowSuicide)
 ~GoRestoreRepetitionAndSuicide ()

Private Member Functions

 GoRestoreRepetitionAndSuicide (const GoRestoreRepetitionAndSuicide &)
 Not implemented.
GoRestoreRepetitionAndSuicideoperator= (const GoRestoreRepetitionAndSuicide &)
 Not implemented.

Private Attributes

GoBoardm_board
bool m_oldAnyRepetition
 arbitrary repetition for both players
bool m_oldKoRepetition
bool m_oldSuicide
 whether self-removal is allowed


Constructor & Destructor Documentation

GoRestoreRepetitionAndSuicide::GoRestoreRepetitionAndSuicide ( GoBoard board,
bool  allowAnyRepetition,
bool  allowKoRepetition,
bool  allowSuicide 
)

Definition at line 1059 of file GoBoardUtil.h.

References GoBoard::AllowAnyRepetition(), GoBoard::AllowKoRepetition(), m_board, GoBoard::Rules(), and GoRules::SetAllowSuicide().

GoRestoreRepetitionAndSuicide::~GoRestoreRepetitionAndSuicide (  ) 

Definition at line 1071 of file GoBoardUtil.h.

References GoBoard::AllowAnyRepetition(), GoBoard::AllowKoRepetition(), m_board, m_oldAnyRepetition, m_oldKoRepetition, m_oldSuicide, GoBoard::Rules(), and GoRules::SetAllowSuicide().

GoRestoreRepetitionAndSuicide::GoRestoreRepetitionAndSuicide ( const GoRestoreRepetitionAndSuicide  )  [private]

Not implemented.


Member Function Documentation

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

Not implemented.


Member Data Documentation

GoBoard& GoRestoreRepetitionAndSuicide::m_board [private]

Definition at line 1079 of file GoBoardUtil.h.

Referenced by GoRestoreRepetitionAndSuicide(), and ~GoRestoreRepetitionAndSuicide().

bool GoRestoreRepetitionAndSuicide::m_oldAnyRepetition [private]

arbitrary repetition for both players

Definition at line 1082 of file GoBoardUtil.h.

Referenced by ~GoRestoreRepetitionAndSuicide().

bool GoRestoreRepetitionAndSuicide::m_oldKoRepetition [private]

Definition at line 1084 of file GoBoardUtil.h.

Referenced by ~GoRestoreRepetitionAndSuicide().

bool GoRestoreRepetitionAndSuicide::m_oldSuicide [private]

whether self-removal is allowed

Definition at line 1087 of file GoBoardUtil.h.

Referenced by ~GoRestoreRepetitionAndSuicide().


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


17 Jun 2010 Doxygen 1.4.7