UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMNativeRef.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
4#if WITH_VERSE_VM || defined(__INTELLISENSE__)
5
7#include "VerseVM/VVMCell.h"
10
11namespace Verse
12{
13
14struct VNativeRef : VCell
15{
18
19 enum class EType : uint8
20 {
22 };
23
24 // The source this ref was projected from. Either a UObject or a VNativeStruct.
26
27 union
28 {
30 };
31
32 EType Type;
33
34 COREUOBJECT_API FOpResult Get(FAllocationContext Context);
35
36 COREUOBJECT_API static FOpResult Get(FAllocationContext Context, const void* Container, FProperty* Property);
37
44 COREUOBJECT_API static FOpResult GetStruct(FAllocationContext Context, const void* Data, UScriptStruct* Struct);
45
46 COREUOBJECT_API FOpResult Set(FAllocationContext Context, VValue Value);
47
49
50 template <bool bTransactional, typename BaseType>
51 COREUOBJECT_API static FOpResult Set(FAllocationContext Context, BaseType Base, void* Container, FProperty* Property, VValue Value);
52
53 static VNativeRef& New(FAllocationContext Context, UObject* Base, FProperty* Property)
54 {
55 return *new (Context.AllocateFastCell(sizeof(VNativeRef))) VNativeRef(Context, Base, Property);
56 }
57
58 static VNativeRef& New(FAllocationContext Context, VNativeStruct* Base, FProperty* Property)
59 {
60 return *new (Context.AllocateFastCell(sizeof(VNativeRef))) VNativeRef(Context, *Base, Property);
61 }
62
63 COREUOBJECT_API FOpResult FreezeImpl(FAllocationContext Context, VTask*, FOp* AwaitPC);
64
65private:
66 VNativeRef(FAllocationContext Context, VValue InBase, FProperty* InProperty)
71 {
73 }
74};
75
76extern template FOpResult VNativeRef::Set<true>(FAllocationContext Context, UObject* Base, void* Container, FProperty* Property, VValue Value);
77extern template FOpResult VNativeRef::Set<true>(FAllocationContext Context, VNativeStruct* Base, void* Container, FProperty* Property, VValue Value);
78extern template FOpResult VNativeRef::Set<false>(FAllocationContext Context, std::nullptr_t Base, void* Container, FProperty* Property, VValue Value);
79
80} // namespace Verse
81#endif
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
T * New(FMemStackBase &Mem, int32 Count=1, int32 Align=DEFAULT_ALIGNMENT)
Definition MemStack.h:259
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition UnrealType.h:174
Definition Object.h:95
Definition UnrealTypePrivate.h:18
Definition Class.h:1720
Type
Definition PawnAction_Move.h:11
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition ObjectPtr.h:426
EType
Definition AccessDetection.h:11
Definition Archive.h:36