UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType > Class Template Reference

#include <FastArrayReplicationFragment.h>

+ Inheritance diagram for UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >:

Public Types

typedef TArray< FastArrayItemType > ItemArrayType
 

Public Member Functions

 TFastArrayReplicationFragment (EReplicationFragmentTraits InTraits, UObject *InOwner, const FReplicationStateDescriptor *InDescriptor, bool bValidateDescriptor=true)
 
- Public Member Functions inherited from UE::Net::Private::FFastArrayReplicationFragmentBase
IRISCORE_API void Register (FFragmentRegistrationContext &Context, EReplicationFragmentTraits InTraits)
 
- Public Member Functions inherited from UE::Net::FReplicationFragment
 FReplicationFragment (const FReplicationFragment &)=delete
 
FReplicationFragmentoperator= (const FReplicationFragment &)=delete
 
 FReplicationFragment (EReplicationFragmentTraits InTraits)
 
virtual ~FReplicationFragment ()
 
EReplicationFragmentTraits GetTraits () const
 

Protected Types

enum  EAllowAdditionalPropertiesType { AllowAdditionalProperties }
 

Protected Member Functions

 TFastArrayReplicationFragment (EReplicationFragmentTraits InTraits, UObject *InOwner, const FReplicationStateDescriptor *InDescriptor, const EAllowAdditionalPropertiesType)
 
void ApplyReplicatedStateForExtraProperties (FReplicationStateApplyContext &Context) const
 
virtual void ApplyReplicatedState (FReplicationStateApplyContext &Context) const override
 
virtual void CallRepNotifies (FReplicationStateApplyContext &Context) override
 
virtual bool PollReplicatedState (EReplicationFragmentPollFlags PollOption) override
 
virtual void ReplicatedStateToString (FStringBuilderBase &StringBuilder, FReplicationStateApplyContext &Context, EReplicationStateToStringFlags Flags) const override
 
bool PollAllState (bool bForceFullCompare=false)
 
bool IsDirty () const
 
bool IsDirtyForPolling () const
 
void MarkDirty ()
 
FastArrayType * GetFastArraySerializerFromOwner () const
 
FastArrayType * GetFastArraySerializerFromReplicationState () const
 
FastArrayType * GetFastArraySerializerFromApplyContext (FReplicationStateApplyContext &Context) const
 
- Protected Member Functions inherited from UE::Net::Private::FFastArrayReplicationFragmentBase
IRISCORE_API FFastArrayReplicationFragmentBase (EReplicationFragmentTraits InTraits, UObject *InOwner, const FReplicationStateDescriptor *InDescriptor, bool bValidateDescriptor=true)
 
virtual IRISCORE_API ~FFastArrayReplicationFragmentBase ()
 
virtual IRISCORE_API void CollectOwner (FReplicationStateOwnerCollector *Owners) const override
 
IRISCORE_API const FReplicationStateDescriptorGetFastArrayPropertyStructDescriptor () const
 
IRISCORE_API const FReplicationStateDescriptorGetArrayElementDescriptor () const
 

Protected Attributes

TUniquePtr< FastArrayType > AccumulatedReceivedState
 
- Protected Attributes inherited from UE::Net::Private::FFastArrayReplicationFragmentBase
TRefCountPtr< const FReplicationStateDescriptorReplicationStateDescriptor
 
TUniquePtr< FPropertyReplicationStateReplicationState
 
UObjectOwner
 
SIZE_T WrappedArrayOffsetRelativeFastArraySerializerProperty
 
- Protected Attributes inherited from UE::Net::FReplicationFragment
EReplicationFragmentTraits Traits
 

Additional Inherited Members

- Static Protected Member Functions inherited from UE::Net::Private::FFastArrayReplicationFragmentBase
static IRISCORE_API void InternalCopyArrayElement (const FReplicationStateDescriptor *ArrayElementDescriptor, void *RESTRICT Dst, const void *RESTRICT Src)
 
static IRISCORE_API bool InternalCompareArrayElement (const FReplicationStateDescriptor *ArrayElementDescriptor, void *RESTRICT Dst, const void *RESTRICT Src)
 
static IRISCORE_API void InternalDequantizeFastArray (FNetSerializationContext &Context, uint8 *RESTRICT DstExternalBuffer, const uint8 *RESTRICT SrcInternalBuffer, const FReplicationStateDescriptor *FastArrayPropertyDescriptor)
 
static IRISCORE_API void InternalPartialDequantizeFastArray (FReplicationStateApplyContext &Context, uint8 *RESTRICT DstExternalBuffer, const uint8 *RESTRICT SrcInternalBuffer, const FReplicationStateDescriptor *FastArrayPropertyDescriptor)
 
static IRISCORE_API void InternalDequantizeExtraProperties (FNetSerializationContext &Context, uint8 *RESTRICT DstExternalBuffer, const uint8 *RESTRICT SrcInternalBuffer, const FReplicationStateDescriptor *Descriptor)
 
static IRISCORE_API void ToString (FStringBuilderBase &StringBuilder, const uint8 *ExternalStateBuffer, const FReplicationStateDescriptor *FastArrayPropertyDescriptor)
 

Detailed Description

template<typename FastArrayItemType, typename FastArrayType>
class UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >

TFastArrayReplicationFragment - Binds a typed FastArray to a FReplicationfragment Used to support FFastArray-based serialization with no required code modifications Backed by a PropertyReplicationState which means that we will have to poll source data for dirtiness, in the case of FastArrays this involves comparing the replication key of the array and its items.

Member Typedef Documentation

◆ ItemArrayType

template<typename FastArrayItemType , typename FastArrayType >
typedef TArray<FastArrayItemType> UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::ItemArrayType

Member Enumeration Documentation

◆ EAllowAdditionalPropertiesType

template<typename FastArrayItemType , typename FastArrayType >
enum UE::Net::TFastArrayReplicationFragment::EAllowAdditionalPropertiesType
protected
Enumerator
AllowAdditionalProperties 

Constructor & Destructor Documentation

◆ TFastArrayReplicationFragment() [1/2]

template<typename FastArrayItemType , typename FastArrayType >
UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::TFastArrayReplicationFragment ( EReplicationFragmentTraits  InTraits,
UObject InOwner,
const FReplicationStateDescriptor InDescriptor,
bool  bValidateDescriptor = true 
)

◆ TFastArrayReplicationFragment() [2/2]

template<typename FastArrayItemType , typename FastArrayType >
UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::TFastArrayReplicationFragment ( EReplicationFragmentTraits  InTraits,
UObject InOwner,
const FReplicationStateDescriptor InDescriptor,
const EAllowAdditionalPropertiesType   
)
inlineprotected

Member Function Documentation

◆ ApplyReplicatedState()

template<typename FastArrayItemType , typename FastArrayType >
void UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::ApplyReplicatedState ( FReplicationStateApplyContext Context) const
overrideprotectedvirtual

This is called from the ReplicationSystem / ReplicationBridge whenever we have new data Depending on the traits of the fragment we either get pointer to a StateBuffer in the expected external format including changemask information or we get the raw quantized state buffer along with the changemask information for any received states.

Implements UE::Net::FReplicationFragment.

◆ ApplyReplicatedStateForExtraProperties()

template<typename FastArrayItemType , typename FastArrayType >
void UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::ApplyReplicatedStateForExtraProperties ( FReplicationStateApplyContext Context) const
protected

◆ CallRepNotifies()

template<typename FastArrayItemType , typename FastArrayType >
void UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::CallRepNotifies ( FReplicationStateApplyContext Context)
overrideprotectedvirtual

Optional method required for backwards compatibility mode which will be invoked for all Fragment with the EReplicationFragmentTraits::HasRepNotifies trait set.

Reimplemented from UE::Net::FReplicationFragment.

◆ GetFastArraySerializerFromApplyContext()

template<typename FastArrayItemType , typename FastArrayType >
FastArrayType * UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::GetFastArraySerializerFromApplyContext ( FReplicationStateApplyContext Context) const
inlineprotected

◆ GetFastArraySerializerFromOwner()

template<typename FastArrayItemType , typename FastArrayType >
FastArrayType * UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::GetFastArraySerializerFromOwner ( ) const
inlineprotected

◆ GetFastArraySerializerFromReplicationState()

template<typename FastArrayItemType , typename FastArrayType >
FastArrayType * UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::GetFastArraySerializerFromReplicationState ( ) const
inlineprotected

◆ IsDirty()

template<typename FastArrayItemType , typename FastArrayType >
bool UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::IsDirty ( ) const
protected

◆ IsDirtyForPolling()

template<typename FastArrayItemType , typename FastArrayType >
bool UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::IsDirtyForPolling ( ) const
protected

◆ MarkDirty()

template<typename FastArrayItemType , typename FastArrayType >
void UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::MarkDirty ( )
protected

◆ PollAllState()

template<typename FastArrayItemType , typename FastArrayType >
bool UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::PollAllState ( bool  bForceFullCompare = false)
protected

◆ PollReplicatedState()

template<typename FastArrayItemType , typename FastArrayType >
bool UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::PollReplicatedState ( EReplicationFragmentPollFlags  PollOption)
overrideprotectedvirtual

Optional Poll method required for backwards compatibility mode which will be invoked for all Fragment with the EReplicationFragmentTraits::NeedsPoll trait set.

Returns
True if the state is dirty, false if not.

Reimplemented from UE::Net::FReplicationFragment.

◆ ReplicatedStateToString()

template<typename FastArrayItemType , typename FastArrayType >
void UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::ReplicatedStateToString ( FStringBuilderBase StringBuilder,
FReplicationStateApplyContext Context,
EReplicationStateToStringFlags  Flags 
) const
overrideprotectedvirtual

Optional method to output state data to StringBuilder.

Reimplemented from UE::Net::FReplicationFragment.

Member Data Documentation

◆ AccumulatedReceivedState

template<typename FastArrayItemType , typename FastArrayType >
TUniquePtr<FastArrayType> UE::Net::TFastArrayReplicationFragment< FastArrayItemType, FastArrayType >::AccumulatedReceivedState
protected

The documentation for this class was generated from the following file: