UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PropertyTempVal.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "HAL/Platform.h"
7
8class FArchive;
9class FProperty;
10class FString;
11class UObject;
12
13// A helper struct which owns a single instance of the type pointed to by a property.
14// The instance is properly constructed, destructed and can be serialized and have other
15// functions called on it.
17{
20
21 // Uncopyable
24
25 // Serializes the instance
26 COREUOBJECT_API void Serialize(FArchive& Ar, const void* Defaults = nullptr);
27
28 // Exports the text of the instance
29 COREUOBJECT_API void ExportText(FString& ValueStr, const void* Defaults = nullptr, UObject* Parent = nullptr, int32 PortFlags = 0, UObject* ExportRootScope = nullptr);
30
31 // Returns a pointer to the internal instance
33 {
34 return Value;
35 }
36
37 // Returns a pointer to the internal instance
38 UE_FORCEINLINE_HINT const void* Get() const
39 {
40 return Value;
41 }
42
43private:
44 // The property which is used to manage to underlying instance.
45 FProperty* Prop;
46
47 // The memory of
48 void* Value;
49};
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition Archive.h:1208
Definition UnrealType.h:174
Definition Object.h:95
Definition PropertyTempVal.h:17
UE_FORCEINLINE_HINT const void * Get() const
Definition PropertyTempVal.h:38
COREUOBJECT_API void ExportText(FString &ValueStr, const void *Defaults=nullptr, UObject *Parent=nullptr, int32 PortFlags=0, UObject *ExportRootScope=nullptr)
Definition PropertyTempVal.cpp:30
FPropertyTempVal & operator=(const FPropertyTempVal &)=delete
UE_FORCEINLINE_HINT void * Get()
Definition PropertyTempVal.h:32
COREUOBJECT_API ~FPropertyTempVal()
Definition PropertyTempVal.cpp:16
FPropertyTempVal(const FPropertyTempVal &)=delete