Assert that the state has been restored to previous state. More...
#include <HexStateAssertRestored.hpp>
Public Member Functions | |
HexStateAssertRestored () | |
Constructor for later explicit call of Init(). | |
HexStateAssertRestored (const HexState &state) | |
Constructor, calls Init(). | |
~HexStateAssertRestored () | |
Destructor, calls CheckRestored(). | |
void | AssertRestored () |
Checks with assertions that the state is the same as it was at the last call to Init() or the constructor. | |
void | Init (const HexState &state) |
void | Clear () |
Set to a state in which the destructor does not call AssertRestored() anymore. | |
Private Member Functions | |
HexStateAssertRestored (const HexStateAssertRestored &) | |
Not implemented. | |
HexStateAssertRestored & | operator= (const HexStateAssertRestored &) |
Not implemented. | |
Private Attributes | |
HexState * | m_state |
HexState | m_origState |
Assert that the state has been restored to previous state.
Definition at line 15 of file HexStateAssertRestored.hpp.
HexStateAssertRestored::HexStateAssertRestored | ( | ) | [inline] |
Constructor for later explicit call of Init().
Definition at line 53 of file HexStateAssertRestored.hpp.
References m_state.
HexStateAssertRestored::HexStateAssertRestored | ( | const HexState & | state | ) | [inline] |
Constructor, calls Init().
Definition at line 60 of file HexStateAssertRestored.hpp.
References Init().
HexStateAssertRestored::~HexStateAssertRestored | ( | ) | [inline] |
Destructor, calls CheckRestored().
Definition at line 68 of file HexStateAssertRestored.hpp.
References AssertRestored().
HexStateAssertRestored::HexStateAssertRestored | ( | const HexStateAssertRestored & | ) | [private] |
Not implemented.
void HexStateAssertRestored::AssertRestored | ( | ) | [inline] |
Checks with assertions that the state is the same as it was at the last call to Init() or the constructor.
Definition at line 75 of file HexStateAssertRestored.hpp.
References m_origState, m_state, HexState::Position(), and HexState::ToPlay().
Referenced by HexModState::Lock(), and ~HexStateAssertRestored().
void HexStateAssertRestored::Clear | ( | ) | [inline] |
Set to a state in which the destructor does not call AssertRestored() anymore.
Definition at line 85 of file HexStateAssertRestored.hpp.
References m_state.
Referenced by HexModState::Lock().
void HexStateAssertRestored::Init | ( | const HexState & | state | ) | [inline] |
Definition at line 92 of file HexStateAssertRestored.hpp.
References m_origState, and m_state.
Referenced by HexStateAssertRestored(), and HexModState::Unlock().
HexStateAssertRestored& HexStateAssertRestored::operator= | ( | const HexStateAssertRestored & | ) | [private] |
Not implemented.
HexState HexStateAssertRestored::m_origState [private] |
Definition at line 43 of file HexStateAssertRestored.hpp.
Referenced by AssertRestored(), and Init().
HexState* HexStateAssertRestored::m_state [private] |
Definition at line 41 of file HexStateAssertRestored.hpp.
Referenced by AssertRestored(), Clear(), HexStateAssertRestored(), and Init().