#include <GoBoardUtil.h>
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. | |
GoRestoreSuicide & | operator= (const GoRestoreSuicide &) |
Not implemented. | |
Private Attributes | |
GoBoard & | m_board |
bool | m_oldState |
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.
GoRestoreSuicide& GoRestoreSuicide::operator= | ( | const GoRestoreSuicide & | ) | [private] |
Not implemented.
GoBoard& GoRestoreSuicide::m_board [private] |
Definition at line 1037 of file GoBoardUtil.h.
Referenced by GoRestoreSuicide(), and ~GoRestoreSuicide().
bool GoRestoreSuicide::m_oldState [private] |