Ocean
|
This class implements a scoped value that allows to change a specified value at the end of a scope. More...
Public Member Functions | |
ScopedValueT (T &target, const T &delayedValue) | |
Creates a new scoped value object. More... | |
ScopedValueT (T &target, T &&delayedValue) | |
Creates a new scoped value object. More... | |
ScopedValueT (T &target, const T &delayedValue, const T &immediateValue) | |
Creates a new scoped value object. More... | |
ScopedValueT (T &target, T &&delayedValue, T &&immediateValue) | |
Creates a new scoped value object. More... | |
~ScopedValueT () | |
Destructs the scoped value object. More... | |
void | setDelayed (const T &value) |
Changes the value that will be assigned at the end of the surrounding scope. More... | |
void | setDelayed (T &&value) |
Changes the value that will be assigned at the end of the surrounding scope. More... | |
void | setImmediately (const T &value) |
Immediately changes the target value, the modification is not applied at the end of the surrounding scope. More... | |
void | setImmediately (T &&value) |
Immediately changes the target value, the modification is not applied at the end of the surrounding scope. More... | |
Protected Member Functions | |
ScopedValueT (const ScopedValueT< T > &value)=delete | |
Disabled copy constructor. More... | |
ScopedValueT & | operator= (const ScopedValueT< T > &value)=delete |
Disabled copy operator. More... | |
Protected Attributes | |
T & | valueTarget |
Target value that will be changed at the end of the surrounding scope. More... | |
T | valueDelayed |
Value that will be assigned at the end of the surrounding scope. More... | |
This class implements a scoped value that allows to change a specified value at the end of a scope.
T | Data type of the value to be set |
|
inline |
Creates a new scoped value object.
target | The target value that will be changed at the end of the surrounding scope |
delayedValue | Value that will be assigned at the end of the surrounding scope |
|
inline |
Creates a new scoped value object.
target | The target value that will be changed at the end of the surrounding scope |
delayedValue | Value that will be assigned at the end of the surrounding scope |
|
inline |
|
inline |
|
inline |
Destructs the scoped value object.
|
protecteddelete |
Disabled copy constructor.
value | The value which would be copied |
|
protecteddelete |
Disabled copy operator.
value | The value which would be copied |
|
inline |
Changes the value that will be assigned at the end of the surrounding scope.
value | The value to be changed |
|
inline |
Changes the value that will be assigned at the end of the surrounding scope.
value | The value to be changed |
|
inline |
Immediately changes the target value, the modification is not applied at the end of the surrounding scope.
value | The value to be changed |
|
inline |
Immediately changes the target value, the modification is not applied at the end of the surrounding scope.
value | The value to be changed |
|
protected |
Value that will be assigned at the end of the surrounding scope.
|
protected |
Target value that will be changed at the end of the surrounding scope.