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

GoRestoreSuicide Class Reference

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

#include <GoBoardUtil.h>

List of all members.

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

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 991 of file GoBoardUtil.h.


Constructor & Destructor Documentation

GoRestoreSuicide::GoRestoreSuicide ( GoBoard board,
bool  allow 
)

Definition at line 994 of file GoBoardUtil.h.

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

GoRestoreSuicide::~GoRestoreSuicide (  ) 

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

Definition at line 1007 of file GoBoardUtil.h.

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

Definition at line 1009 of file GoBoardUtil.h.

Referenced by ~GoRestoreSuicide().


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


Sun Mar 13 2011 Doxygen 1.7.1