7#include "Containers/Array.h"
8#include "Containers/Map.h"
18 class FFragmentRegistrationContext;
19 class FNetSerializationContext;
20 struct FReplicationStateDescriptor;
23 class FReplicationStateDescriptorRegistry;
24 struct FFragmentRegistrationContextPrivateAccessor;
43 if (OwnerCount < MaxOwnerCount)
45 if (OwnerCount && Owners[OwnerCount - 1] == Object)
49 Owners[OwnerCount] = Object;
57 void Reset() { OwnerCount = 0; }
62 const uint32 MaxOwnerCount;
260 Fragments.
Add({ Descriptor, SrcReplicationStateBuffer, Fragment });
272 return Fragments.
Num() > 0 || bIsAFragmentlessNetObject;
287 UObject* MainObjectInstance =
nullptr;
290 const UObject* Template =
nullptr;
293 const UObject* MainObjectDefaultStateSource =
nullptr;
297 bool bIsAFragmentlessNetObject =
false;
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
UE_REWRITE SizeType Num() const
Definition Array.h:1144
UE_NODEBUG UE_FORCEINLINE_HINT SizeType Add(ElementType &&Item)
Definition Array.h:2696
Definition ReplicationFragment.h:244
FFragmentRegistrationContext(Private::FReplicationStateDescriptorRegistry *InReplicationStateRegistry, UReplicationSystem *InReplicationSystem, const EReplicationFragmentTraits InFragmentTraits, UObject *MainObject)
Definition ReplicationFragment.h:246
void RegisterReplicationFragment(FReplicationFragment *Fragment, const FReplicationStateDescriptor *Descriptor, void *SrcReplicationStateBuffer)
Definition ReplicationFragment.h:258
void SetIsFragmentlessNetObject(bool bIsFragmentless)
Definition ReplicationFragment.h:264
bool WasRegistered() const
Definition ReplicationFragment.h:270
int32 NumFragments() const
Definition ReplicationFragment.h:276
const EReplicationFragmentTraits GetFragmentTraits() const
Definition ReplicationFragment.h:255
bool IsFragmentlessNetObject() const
Definition ReplicationFragment.h:267
Definition NetSerializationContext.h:31
Definition ReplicationFragment.h:176
virtual bool PollReplicatedState(EReplicationFragmentPollFlags PollOption=EReplicationFragmentPollFlags::PollAllState)
Definition ReplicationFragment.h:208
virtual void ReplicatedStateToString(FStringBuilderBase &StringBuilder, FReplicationStateApplyContext &Context, EReplicationStateToStringFlags Flags=EReplicationStateToStringFlags::None) const
Definition ReplicationFragment.h:213
FReplicationFragment & operator=(const FReplicationFragment &)=delete
EReplicationFragmentTraits Traits
Definition ReplicationFragment.h:216
FReplicationFragment(const FReplicationFragment &)=delete
virtual void ApplyReplicatedState(FReplicationStateApplyContext &Context) const =0
FReplicationFragment(EReplicationFragmentTraits InTraits)
Definition ReplicationFragment.h:181
virtual void CallRepNotifies(FReplicationStateApplyContext &Context)
Definition ReplicationFragment.h:202
virtual void CollectOwner(FReplicationStateOwnerCollector *Owners) const
Definition ReplicationFragment.h:197
virtual ~FReplicationFragment()
Definition ReplicationFragment.h:182
EReplicationFragmentTraits GetTraits() const
Definition ReplicationFragment.h:185
Definition ReplicationFragment.h:32
void AddOwner(UObject *Object)
Definition ReplicationFragment.h:41
FReplicationStateOwnerCollector(UObject **InOwners, uint32 InMaxOwnerCount)
Definition ReplicationFragment.h:34
void Reset()
Definition ReplicationFragment.h:57
UObject ** GetOwners() const
Definition ReplicationFragment.h:54
uint32 GetOwnerCount() const
Definition ReplicationFragment.h:55
Definition ReplicationStateDescriptorRegistry.h:31
Definition ReplicationSystem.h:70
Definition OverriddenPropertySet.cpp:45
@ None
Definition ReplicationDataStreamDebug.h:25
Definition NetworkVersion.cpp:28
EReplicationStateToStringFlags
Definition ReplicationFragment.h:94
@ OnlyIncludeDirtyMembers
EReplicationFragmentPollFlags
Definition ReplicationFragment.h:153
@ ForceRefreshCachedObjectReferencesAfterGC
EReplicationFragmentTraits
Definition ReplicationFragment.h:102
@ HasPersistentTargetStateBuffer
@ DeleteWithInstanceProtocol
@ HasPropertyReplicationState
@ SupportsPartialDequantizedState
TArray< FReplicationFragmentInfo, TInlineAllocator< 32 > > FReplicationFragments
Definition ReplicationFragment.h:241
@ HasFullPushBasedDirtiness
EFragmentRegistrationFlags
Definition ReplicationFragment.h:220
@ AllowFastArraysWithAdditionalProperties
@ InitializeDefaultStateFromClassDefaults
Definition ReplicationFragment.h:236
const FReplicationStateDescriptor * Descriptor
Definition ReplicationFragment.h:237
void * SrcReplicationStateBuffer
Definition ReplicationFragment.h:238
FReplicationFragment * Fragment
Definition ReplicationFragment.h:239
Definition ReplicationFragment.h:66
FNetSerializationContext * NetSerializationContext
Definition ReplicationFragment.h:68
FStateBufferData StateBufferData
Definition ReplicationFragment.h:83
uint32 bIsInit
Definition ReplicationFragment.h:86
const FReplicationStateDescriptor * Descriptor
Definition ReplicationFragment.h:67
uint32 bMightHaveUnresolvableInitReferences
Definition ReplicationFragment.h:90
uint32 bHasUnresolvableReferences
Definition ReplicationFragment.h:88
Definition ReplicationStateDescriptor.h:199
Definition ReplicationFragmentInternal.h:10
Definition ReplicationFragment.h:74
const uint8 * RawStateBuffer
Definition ReplicationFragment.h:79
const uint32 * ChangeMaskData
Definition ReplicationFragment.h:78
uint8 * ExternalStateBuffer
Definition ReplicationFragment.h:75