![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <GuardValueAccessors.h>
Public Member Functions | |
| TGuardValueAccessors (TFunctionRef< AssignedType()> Getter, TFunction< void(const AssignedType &)> &&InSetter, const AssignedType &NewValue) | |
| ~TGuardValueAccessors () | |
| UE_FORCEINLINE_HINT const AssignedType & | GetOriginalValue () const |
Guard around saving/restoring a value. Commonly used to make sure a value is restored even if the code early outs in the future. Usage: TGuardValueAccessors GuardSomeBool(UE::SomeGetterFunction, UE::SomeSetterFunction, false); // Saves the state, sets the value, and restores it in dtor.
|
inlineexplicit |
|
inline |
|
inline |
Provides read-only access to the original value of the data being tracked by this struct