helper class to set value on construction and reset to previous value on destruction. (RAII-idiom) More...
#include <util.h>
Public Member Functions | |
cSetValueTemporarily (T *_value_ptr, T new_value) | |
CTOR: remember current value of _value_ptr and set it to new_value. More... | |
~cSetValueTemporarily () | |
DTOR: restore the remembered value. More... | |
Private Attributes | |
T | old_value |
T * | value_ptr |
helper class to set value on construction and reset to previous value on destruction. (RAII-idiom)
|
inline |
|
inline |
|
private |
|
private |