UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IrisFastArraySerializer.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2#pragma once
3
6#include "IrisFastArraySerializer.generated.h"
7
8// Forward declarations
9namespace UE::Net::Private
10{
11
12struct FIrisFastArraySerializerPrivateAccessor;
13
14}
15
27{
28 // At the moment as we have no way to specify this per derived type, currently we reserve a fixed range of bits used for the changemask, the first bit is used for the array itself
29 enum { IrisFastArrayChangeMaskBits = 63U };
30 enum { IrisFastArrayChangeMaskBitOffset = 1U };
31 enum { IrisFastArrayPropertyBitIndex = 0U };
32
35
37
40
43
46
49
51 void MarkItemDirty(FFastArraySerializerItem & Item)
52 {
54 if (ReplicationStateHeader.IsBound())
55 {
56 // Mark array dirty for Iris so that is it copied
57 InternalMarkArrayAsDirty();
58 }
59 }
60
63 {
65 if (ReplicationStateHeader.IsBound())
66 {
67 // Mark array dirty for Iris
68 InternalMarkArrayAsDirty();
69 }
70 }
71
73
74private:
75 enum : unsigned
76 {
77 MemberChangeMaskStorageIndex = 0U,
78 ConditionalChangeMaskStorageIndex = 2U,
79 };
80
81 // Mark item at index as changed, and set the array as dirty
82 IRISCORE_API void InitChangeMask();
83 IRISCORE_API void InternalMarkItemChanged(int32 ItemIdx);
84 IRISCORE_API void InternalMarkAllItemsChanged();
85 IRISCORE_API void InternalMarkArrayAsDirty();
86
87 // Header for dirty state tracking needs to be just before ChangeMaskStorage. See GetReplicationStateHeader for more info.
88 UE::Net::FReplicationStateHeader ReplicationStateHeader;
89
90 // Storage for changemask, this is currently hardcoded
91 UPROPERTY(Transient, NotReplicated)
92 uint32 ChangeMaskStorage[4];
93};
94
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition RobinHoodHashTable.h:18
Definition NetworkVersion.cpp:28
Definition FastArraySerializer.h:299
Definition FastArraySerializer.h:409
void MarkItemDirty(FFastArraySerializerItem &Item)
Definition FastArraySerializer.h:441
void MarkArrayDirty()
Definition FastArraySerializer.h:457
Definition IrisFastArraySerializer.h:27
void MarkArrayDirty()
Definition IrisFastArraySerializer.h:62
Definition ReplicationStateFwd.h:20
Definition IrisFastArraySerializerInternal.h:22