Used to permit/forbid self-removal for certain periods of play. More...
#include <GoBoardUtil.h>
Public Member Functions | |
GoRestoreSuicide (GoBoard &board, bool allow) | |
~GoRestoreSuicide () | |
Private Member Functions | |
GoRestoreSuicide (const GoRestoreSuicide &) | |
Not implemented. | |
GoRestoreSuicide & | operator= (const GoRestoreSuicide &) |
Not implemented. | |
Private Attributes | |
GoBoard & | m_board |
bool | m_oldState |
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.
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.
GoRestoreSuicide& GoRestoreSuicide::operator= | ( | const GoRestoreSuicide & | ) | [private] |
Not implemented.
GoBoard& GoRestoreSuicide::m_board [private] |
Definition at line 1007 of file GoBoardUtil.h.
Referenced by GoRestoreSuicide(), and ~GoRestoreSuicide().
bool GoRestoreSuicide::m_oldState [private] |
Definition at line 1009 of file GoBoardUtil.h.
Referenced by ~GoRestoreSuicide().