UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ScopedGuard.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
#pragma once
4
5
#if (defined(__AUTORTFM) && __AUTORTFM)
6
7
namespace
AutoRTFM
8
{
9
10
template
<
typename
T>
11
class
TScopedGuard
12
{
13
public
:
14
TScopedGuard
(T& Ref,
const
T&
Value
)
15
: OldValue(
Ref
)
16
,
Ref
(
Ref
)
17
{
18
Ref
=
Value
;
19
}
20
21
~TScopedGuard
()
22
{
23
Ref
= OldValue;
24
}
25
26
private
:
27
T OldValue;
28
T&
Ref
;
29
};
30
31
}
// namespace AutoRTFM
32
33
#endif
// (defined(__AUTORTFM) && __AUTORTFM)
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
EColorPickerChannels::Value
@ Value
AutoRTFM
Definition
API.cpp:57
UP::Ref
@ Ref
Value is copied out after function call. Only valid on function param declaration.
Definition
ObjectMacros.h:1074
Engine
Source
Runtime
AutoRTFM
Private
ScopedGuard.h
Generated by
1.9.8