UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
StructuredArchiveSlotBase.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6
7class FArchive;
9struct FArchiveState;
10
12{
14 {
15 FElementId() = default;
16
18 : Id(InId)
19 {
20 }
21
22 bool IsValid() const
23 {
24 return Id != 0;
25 }
26
27 void Reset()
28 {
29 Id = 0;
30 }
31
32 bool operator==(const FElementId& Rhs) const
33 {
34 return Id == Rhs.Id;
35 }
36
37 bool operator!=(const FElementId& Rhs) const
38 {
39 return Id != Rhs.Id;
40 }
41
42 private:
43 uint32 Id = 0;
44 };
45
46 // Represents a position of a slot within the hierarchy.
48 {
49 friend FStructuredArchive;
50
51 public:
54
60 };
61
62 // The base class of all slot types
65 : protected FSlotPosition
66#endif
67 {
68 friend FStructuredArchive;
69
70 protected:
71 // Token which needs to be passed to the constructor, so only friends are able to do so, but
72 // still allows emplacement without the container being a friend.
73 enum class EPrivateToken {};
74
75 public:
76#if WITH_TEXT_ARCHIVE_SUPPORT
80 {
81 }
82#else
87#endif
88
91
92 protected:
94 };
95}
#define WITH_TEXT_ARCHIVE_SUPPORT
Definition Build.h:170
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
if(Failed) console_printf("Failed.\n")
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
Definition StructuredArchive.h:57
Definition StructuredArchiveSlotBase.h:67
EPrivateToken
Definition StructuredArchiveSlotBase.h:73
CORE_API const FArchiveState & GetArchiveState() const
Definition StructuredArchiveSlots.cpp:12
FStructuredArchive & StructuredArchive
Definition StructuredArchiveSlotBase.h:93
UE_FORCEINLINE_HINT FSlotBase(EPrivateToken, FStructuredArchive &InStructuredArchive)
Definition StructuredArchiveSlotBase.h:83
CORE_API FArchive & GetUnderlyingArchive() const
Definition StructuredArchiveSlots.cpp:7
Definition StructuredArchiveSlotBase.h:48
FElementId ElementId
Definition StructuredArchiveSlotBase.h:53
int32 Depth
Definition StructuredArchiveSlotBase.h:52
FSlotPosition(int32 InDepth, FElementId InElementId)
Definition StructuredArchiveSlotBase.h:55
Definition StructuredArchive.h:29
Definition Archive.h:70
Definition StructuredArchiveSlotBase.h:14
bool operator!=(const FElementId &Rhs) const
Definition StructuredArchiveSlotBase.h:37
FElementId(uint32 InId)
Definition StructuredArchiveSlotBase.h:17
bool operator==(const FElementId &Rhs) const
Definition StructuredArchiveSlotBase.h:32
bool IsValid() const
Definition StructuredArchiveSlotBase.h:22
void Reset()
Definition StructuredArchiveSlotBase.h:27