Saves the current state of a variable of type T and asserts that the saved value equals the value upon leaving the scope. More...
#include <SgRestorer.h>
Public Member Functions | |
SgAssertRestored (T *oldState) | |
~SgAssertRestored () | |
Private Member Functions | |
SgAssertRestored (const SgAssertRestored &) | |
Not implemented. | |
SgAssertRestored & | operator= (const SgAssertRestored &) |
Not implemented. | |
Private Attributes | |
T * | m_variable |
T | m_oldState |
Saves the current state of a variable of type T and asserts that the saved value equals the value upon leaving the scope.
Definition at line 45 of file SgRestorer.h.
SgAssertRestored< T >::SgAssertRestored | ( | T * | oldState | ) | [explicit] |
Definition at line 48 of file SgRestorer.h.
SgAssertRestored< T >::~SgAssertRestored | ( | ) |
Definition at line 53 of file SgRestorer.h.
References SgAssertRestored< T >::m_oldState, SgAssertRestored< T >::m_variable, and SG_ASSERT.
SgAssertRestored< T >::SgAssertRestored | ( | const SgAssertRestored< T > & | ) | [private] |
Not implemented.
SgAssertRestored& SgAssertRestored< T >::operator= | ( | const SgAssertRestored< T > & | ) | [private] |
Not implemented.
T SgAssertRestored< T >::m_oldState [private] |
Definition at line 61 of file SgRestorer.h.
Referenced by SgAssertRestored< T >::~SgAssertRestored().
T* SgAssertRestored< T >::m_variable [private] |
Definition at line 59 of file SgRestorer.h.
Referenced by SgAssertRestored< T >::~SgAssertRestored().