Navigation
API > API/Runtime > API/Runtime/Core
Combines TGuardValueAccessors with FInheritedContextExtension + FInheritedContextExtensionScope. Like TInheritedGuardValue but for variables accessed through getter/setter functions rather than direct references. Getter and Setter are compile-time function pointers baked into the extension callbacks — no TFunction overhead.
Usage (creates extension internally): TInheritedGuardValueAccessors<&UE::IsSavingPackage, &UE::SetIsSavingPackage> Guard(true);
Usage with pre-built extension (avoids allocation per guard): static auto GExt = UE::MakeInheritedContextExtension<&UE::IsSavingPackage, &UE::SetIsSavingPackage>(); TInheritedGuardValueAccessors<&UE::IsSavingPackage, &UE::SetIsSavingPackage> Guard(GExt, true);
| Name | TInheritedGuardValueAccessors |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/Async/InheritedGuardValue.h |
| Include Path | #include "Async/InheritedGuardValue.h" |
Syntax
template<auto Getter, auto Setter>
struct TInheritedGuardValueAccessors : private FNoncopyable
Inheritance Hierarchy
- FNoncopyable → TInheritedGuardValueAccessors
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TInheritedGuardValueAccessors
(
const ValueType& NewValue |
Creates the extension internally. | Async/InheritedGuardValue.h | |
TInheritedGuardValueAccessors
(
const UE::FInheritedContextExtension& InExtension, |
Pre-built extension constructor — reuses an existing FInheritedContextExtension. | Async/InheritedGuardValue.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TInheritedGuardValueAccessors() |
Async/InheritedGuardValue.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ValueType | std::decay_t< decltype(Getter())> | Async/InheritedGuardValue.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Extension | UE::FInheritedContextExtension | Async/InheritedGuardValue.h | ||
| OriginalValue | ValueType | Async/InheritedGuardValue.h | ||
| Scope | UE::FInheritedContextExtensionScope | Async/InheritedGuardValue.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const ValueType & GetOriginalValue() |
Provides read-only access to the original value of the data being tracked by this struct | Async/InheritedGuardValue.h |