UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMMarkStackVisitorInline.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
9
10namespace Verse
11{
12
13template <typename T>
14inline void FMarkStackVisitor::Visit(T& Value, const TCHAR*)
15{
16 using Verse::Visit;
17 Visit(*this, Value);
18}
19
20template <typename T>
21inline void FMarkStackVisitor::Visit(T Begin, T End, const TCHAR*)
22{
23 for (; Begin != End; ++Begin)
24 {
25 auto&& Element = *Begin;
26 Visit(Element, TEXT(""));
27 }
28}
29
30// Arrays
31template <typename ElementType, typename AllocatorType>
32inline void FMarkStackVisitor::Visit(TArray<ElementType, AllocatorType>& Values, const TCHAR*)
33{
34 Visit(Values.begin(), Values.end(), TEXT(""));
35}
36
37// Sets
38template <typename ElementType, typename KeyFuncs, typename Allocator>
39inline void FMarkStackVisitor::Visit(TSet<ElementType, KeyFuncs, Allocator>& Values, const TCHAR*)
40{
41 for (ElementType& Value : Values)
42 {
43 Visit(Value, TEXT(""));
44 }
45}
46
47// Maps
48template <typename KeyType, typename ValueType, typename SetAllocator, typename KeyFuncs>
49inline void FMarkStackVisitor::Visit(TMap<KeyType, ValueType, SetAllocator, KeyFuncs>& Values, const TCHAR*)
50{
51 for (TPair<KeyType, ValueType>& Pair : Values)
52 {
53 Visit(Pair.Key, TEXT(""));
54 Visit(Pair.Value, TEXT(""));
55 }
56}
57
58} // namespace Verse
59#endif // WITH_VERSE_VM
#define TEXT(x)
Definition Platform.h:1272
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
decltype(auto) Visit(Func &&Callable, Variants &&... Args)
Definition TVariant.h:271
Definition Array.h:670
UE_NODEBUG UE_FORCEINLINE_HINT RangedForIteratorType end()
Definition Array.h:3391
UE_NODEBUG UE_FORCEINLINE_HINT RangedForIteratorType begin()
Definition Array.h:3389
Definition UnrealString.h.inl:34
@ Element
Definition Visu.h:18
Definition Archive.h:36
Definition Tuple.h:652