Sets a referenced variable to a given value and restores it when going out of context.
More...
|
| Hold (T &ref, T const value) |
| The constructor sets the referenced variable to the given value. More...
|
|
| ~Hold () |
| Restores the original value.
|
|
|
const T | restore |
| The original value.
|
|
T & | ref |
| Reference to the variable.
|
|
template<typename T>
class anonymous_namespace{libloadplay.cpp}::Hold< T >
Sets a referenced variable to a given value and restores it when going out of context.
- Template Parameters
-
T | The type of the value to hold |
◆ Hold()
template<typename T >
anonymous_namespace{libloadplay.cpp}::Hold< T >::Hold |
( |
T & |
ref, |
|
|
T const |
value |
|
) |
| |
|
inline |
The constructor sets the referenced variable to the given value.
- Parameters
-
ref | The variable to hold and restore |
value | The value to set the variable to |
The documentation for this class was generated from the following file: