UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMGlobalTrivialEmergentTypePtr.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if WITH_VERSE_VM || defined(__INTELLISENSE__)
6
8#include <atomic>
9
10namespace Verse
11{
12
13struct VCppClassInfo;
14struct VEmergentType;
15
17{
19
20protected:
21 VEmergentType& Get(FAllocationContext Context, VCppClassInfo* ClassInfo, bool bWithShape)
22 {
23 VEmergentType* Result = EmergentType.load(std::memory_order_relaxed);
24 std::atomic_signal_fence(std::memory_order_seq_cst);
25 if (Result)
26 {
27 return *Result;
28 }
29 else
30 {
32 }
33 }
34
36
37 std::atomic<VEmergentType*> EmergentType = nullptr;
38};
39
40template <VCppClassInfo* ClassInfo>
42{
44
45 VEmergentType& Get(FAllocationContext Context, bool bWithShape = false)
46 {
47 return FGlobalTrivialEmergentTypePtr::Get(Context, ClassInfo, bWithShape);
48 }
49};
50
51} // namespace Verse
52#endif // WITH_VERSE_VM
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition ObjectPtr.h:426
UE_STRING_CLASS Result(Forward< LhsType >(Lhs), RhsLen)
Definition String.cpp.inl:732
Definition Archive.h:36