UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMOption.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
7#include "CoreTypes.h"
9#include "VVMContext.h"
11#include "VVMType.h"
12#include "VVMValue.h"
13
14namespace Verse
15{
16enum class EValueStringFormat;
17
18// Inherits from VType because true, which is option{false}, is a type.
19struct VOption : VType
20{
23
24 static VOption& New(FAllocationContext Context, VValue InValue)
25 {
26 return *new (Context.AllocateFastCell(sizeof(VOption))) VOption(Context, InValue);
27 }
28
29 VValue GetValue() const
30 {
31 return Value.Get().Follow();
32 }
33
34 void SetValue(FAllocationContext Context, VValue InValue)
35 {
36 check(!InValue.IsUninitialized());
37 Value.Set(Context, InValue);
38 }
39
41 void VisitMembersImpl(FAllocationContext Context, FDebuggerVisitor& Visitor);
42 void AppendToStringImpl(FAllocationContext Context, FUtf8StringBuilderBase& Builder, EValueStringFormat Format, TSet<const void*>& VisitedObjects, uint32 RecursionDepth);
44
45 static constexpr bool SerializeIdentity = false;
46 static void SerializeLayout(FAllocationContext Context, VOption*& This, FStructuredArchiveVisitor& Visitor);
47 void SerializeImpl(FAllocationContext Context, FStructuredArchiveVisitor& Visitor);
48
49private:
50 VOption(FAllocationContext Context, VValue InValue)
53 {
54 }
55
57};
58
59} // namespace Verse
60#endif // WITH_VERSE_VM
#define check(expr)
Definition AssertionMacros.h:314
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
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition JsonObject.h:23
Definition UnrealString.h.inl:34
Definition SharedPointer.h:692
Definition StringBuilder.h:79
IAnalyticsPropertyStore::EStatusCode SetValue(TGetter &&GetterFn, TSetter &&SetterFn, const T &ProposedValue, TCompare &&ConditionFn)
Definition AnalyticsPropertyStore.cpp:34
T::FDataType GetValue(const UBlackboardComponent &Blackboard, const FName &Name, FBlackboard::FKey &InOutCachedKey, const typename T::FDataType &DefaultValue)
Definition ValueOrBBKey.h:51
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition ObjectPtr.h:426
bool SerializeImpl(const UScriptStruct *InSourceEventType, const void *InSourceEventData, FLiveLinkSerializedFrameData &OutSerializedData)
Definition LiveLinkCompression.cpp:126
Definition Archive.h:36
EValueStringFormat
Definition VVMValuePrinting.h:17