#include <GoBoardUtil.h>
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. | |
GoRestoreRepetitionAndSuicide & | operator= (const GoRestoreRepetitionAndSuicide &) |
Not implemented. | |
Private Attributes | |
GoBoard & | m_board |
bool | m_oldAnyRepetition |
arbitrary repetition for both players | |
bool | m_oldKoRepetition |
bool | m_oldSuicide |
whether self-removal is allowed |
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.
GoRestoreRepetitionAndSuicide& GoRestoreRepetitionAndSuicide::operator= | ( | const GoRestoreRepetitionAndSuicide & | ) | [private] |
Not implemented.
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] |
bool GoRestoreRepetitionAndSuicide::m_oldSuicide [private] |
whether self-removal is allowed
Definition at line 1087 of file GoBoardUtil.h.
Referenced by ~GoRestoreRepetitionAndSuicide().