UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMArray.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 "VVMArrayBase.h"
10#include "VVMType.h"
11#include "VVMUniqueCreator.h"
12
13namespace Verse
14{
15
16struct VInt;
17
18struct VArray : VArrayBase
19{
22
24
25 static VArray& New(FAllocationContext Context, uint32 NumValues, EArrayType ArrayType)
26 {
27 return *new (Context.AllocateFastCell(sizeof(VArray))) VArray(Context, NumValues, ArrayType);
28 }
29
30 static VArray& New(FAllocationContext Context, std::initializer_list<VValue> InitList)
31 {
32 return *new (Context.AllocateFastCell(sizeof(VArray))) VArray(Context, InitList);
33 }
34
35 template <typename InitIndexFunc, typename = std::enable_if_t<std::is_same_v<VValue, std::invoke_result_t<InitIndexFunc, uint32>>>>
36 static VArray& New(FAllocationContext Context, uint32 NumValues, InitIndexFunc&& InitFunc)
37 {
38 return *new (Context.AllocateFastCell(sizeof(VArray))) VArray(Context, NumValues, InitFunc);
39 }
40
41 static VArray& New(FAllocationContext Context, FUtf8StringView String)
42 {
43 return *new (Context.AllocateFastCell(sizeof(VArray))) VArray(Context, String, &GlobalTrivialEmergentType.Get(Context));
44 }
45
46 static VArray& New(FAllocationContext Context)
47 {
48 return VArray::New(Context, 0, EArrayType::None);
49 }
50
51 static void SerializeLayout(FAllocationContext Context, VArray*& This, FStructuredArchiveVisitor& Visitor) { SerializeLayoutImpl<VArray>(Context, This, Visitor); }
52
53private:
54 friend struct VMutableArray;
55 VArray(FAllocationContext Context, uint32 InNumValues, EArrayType ArrayType)
57
58 VArray(FAllocationContext Context, std::initializer_list<VValue> InitList)
60
61 template <typename InitIndexFunc, typename = std::enable_if_t<std::is_same_v<VValue, std::invoke_result_t<InitIndexFunc, uint32>>>>
64
65protected:
66 VArray(FAllocationContext Context, FUtf8StringView String, VEmergentType* Type)
68};
69
70} // namespace Verse
71#endif // WITH_VERSE_VM
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
Type
Definition PawnAction_Move.h:11
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition ObjectPtr.h:426
Definition Archive.h:36