UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMAux.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
6
7#if WITH_VERSE_VM || defined(__INTELLISENSE__)
8
9namespace Verse
10{
11
12// This struct is just a pointer wrapper to be used when you want to allocate `Aux` memory.
13// Aux memory is marked but not put on the MarkStack like VCells and we wrap Aux pointers in this
14// so TWriteBarrier/TWeakBarrier can know to mark its `Ptr` as Aux.
15template <typename T>
16class TAux
17{
18protected:
19 T* Ptr;
20
21public:
22 TAux()
23 : Ptr(nullptr) {}
24 TAux(void* InPtr)
25 : Ptr(static_cast<T*>(InPtr)) {}
26
27 T* GetPtr() { return Ptr; }
28
29 explicit operator bool() const { return !!(Ptr); }
30
31 T& operator*()
32 {
33 check(Ptr);
34 return *Ptr;
35 };
36 T* operator->()
37 {
38 check(Ptr);
39 return Ptr;
40 };
41 T& operator[](size_t Index)
42 {
43 return Ptr[Index];
44 }
45};
46
47template <>
48class TAux<void>
49{
50protected:
51 void* Ptr;
52
53public:
54 TAux()
55 : Ptr(nullptr) {}
56 TAux(void* InPtr)
57 : Ptr(InPtr) {}
58
59 void* GetPtr() { return Ptr; }
60
61 explicit operator bool() const { return !!(Ptr); }
62};
63
64template <typename T>
65constexpr inline bool IsTAux = false;
66
67template <typename T>
68constexpr inline bool IsTAux<TAux<T>> = true;
69
70struct VBuffer;
71template <>
72constexpr inline bool IsTAux<VBuffer> = true;
73
74} // namespace Verse
75#endif // WITH_VERSE_VM
OODEFFUNC typedef void(OODLE_CALLBACK t_fp_OodleCore_Plugin_Free)(void *ptr)
#define check(expr)
Definition AssertionMacros.h:314
UE_FORCEINLINE_HINT FLinearColor operator*(float Scalar, const FLinearColor &Color)
Definition Color.h:473
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_FORCEINLINE_HINT uint32 GetPtr() const
Definition LockFreeList.h:15
const bool
Definition NetworkReplayStreaming.h:178
Definition Archive.h:36
U16 Index
Definition radfft.cpp:71