|
Open Model Railroad Network (OpenMRN)
|
Type-accurate class that holds the temporary variable with the old value, the pointer to the variable and restores the previous state upon destruction. More...
Public Member Functions | |
| Holder (T *variable, T new_value) | |
Private Attributes | |
| T * | variable_ |
| Points to the variable that needs resetting. | |
| T | oldValue_ |
| old value to reset variable_ to when destroyed. | |
Type-accurate class that holds the temporary variable with the old value, the pointer to the variable and restores the previous state upon destruction.
Definition at line 366 of file test_main.hxx.
|
inline |
| variable | what to set temporarily |
| new_value | what should be the new value of variable during this code block. |
Definition at line 372 of file test_main.hxx.
|
inline |
Definition at line 379 of file test_main.hxx.
|
private |
old value to reset variable_ to when destroyed.
Definition at line 388 of file test_main.hxx.
|
private |
Points to the variable that needs resetting.
Definition at line 386 of file test_main.hxx.