ScopeValue template class sets a value to a variable of Type for the lifetime of the ScopeValue object, and restores the previous value of the variable when destroyed.
More...
#include <kanzi/core/util/scope_value.hpp>
|
| ScopeValue (Type &variable, const Type &value) |
| Constructor, backs up the value of the variable and sets the value as current value. More...
|
|
| ~ScopeValue () |
| Destructor, restores the value of the scoped variable. More...
|
|
template<typename Type>
class kanzi::ScopeValue< Type >
ScopeValue template class sets a value to a variable of Type for the lifetime of the ScopeValue object, and restores the previous value of the variable when destroyed.
- Template Parameters
-
Type | The type of the variable and the value to assign to the variable. |
- Since
- Kanzi 3.9.0
◆ ScopeValue()
Constructor, backs up the value of the variable
and sets the value as current value.
◆ ~ScopeValue()
Destructor, restores the value of the scoped variable.
The documentation for this class was generated from the following file: