Index   Main   Namespaces   Classes   Hierarchy   Annotated   Files   Compound   Global   Pages  

GoRestoreSuicide Class Reference

#include <GoBoardUtil.h>

List of all members.


Detailed Description

Used to permit/forbid self-removal for certain periods of play.

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

Definition at line 1021 of file GoBoardUtil.h.

Public Member Functions

 GoRestoreSuicide (GoBoard &board, bool allow)
 ~GoRestoreSuicide ()

Private Member Functions

 GoRestoreSuicide (const GoRestoreSuicide &)
 Not implemented.
GoRestoreSuicideoperator= (const GoRestoreSuicide &)
 Not implemented.

Private Attributes

GoBoardm_board
bool m_oldState


Constructor & Destructor Documentation

GoRestoreSuicide::GoRestoreSuicide ( GoBoard board,
bool  allow 
)

Definition at line 1024 of file GoBoardUtil.h.

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

GoRestoreSuicide::~GoRestoreSuicide (  ) 

Definition at line 1031 of file GoBoardUtil.h.

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

GoRestoreSuicide::GoRestoreSuicide ( const GoRestoreSuicide  )  [private]

Not implemented.


Member Function Documentation

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

Not implemented.


Member Data Documentation

GoBoard& GoRestoreSuicide::m_board [private]

Definition at line 1037 of file GoBoardUtil.h.

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

bool GoRestoreSuicide::m_oldState [private]

Definition at line 1039 of file GoBoardUtil.h.

Referenced by ~GoRestoreSuicide().


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


17 Jun 2010 Doxygen 1.4.7