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

#include <FastArrayReplicationFragment.h>

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

Public Types

typedef TArray< FastArrayItemType > ItemArrayType
 

Public Member Functions

 TNativeFastArrayReplicationFragment (EReplicationFragmentTraits InTraits, UObject *InOwner, const FReplicationStateDescriptor *InDescriptor)
 
void Register (FFragmentRegistrationContext &Fragments, EReplicationFragmentTraits Traits=EReplicationFragmentTraits::None)
 
- 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 Member Functions

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 IsDirty () const
 
FastArrayType * GetFastArraySerializerFromOwner () const
 
- Protected Member Functions inherited from UE::Net::Private::FNativeFastArrayReplicationFragmentBase
IRISCORE_API FNativeFastArrayReplicationFragmentBase (EReplicationFragmentTraits InTraits, UObject *InOwner, const FReplicationStateDescriptor *InDescriptor)
 
IRISCORE_API const FReplicationStateDescriptorGetFastArrayPropertyStructDescriptor () const
 
IRISCORE_API const FReplicationStateDescriptorGetArrayElementDescriptor () const
 
virtual IRISCORE_API void CollectOwner (FReplicationStateOwnerCollector *Owners) const override
 

Additional Inherited Members

- Static Protected Member Functions inherited from UE::Net::Private::FNativeFastArrayReplicationFragmentBase
static IRISCORE_API void InternalDequantizeFastArray (FNetSerializationContext &Context, uint8 *RESTRICT DstExternalBuffer, const uint8 *RESTRICT SrcInternalBuffer, const FReplicationStateDescriptor *FastArrayPropertyDescriptor)
 
static IRISCORE_API void ToString (FStringBuilderBase &StringBuilder, const uint8 *ExternalStateBuffer, const FReplicationStateDescriptor *FastArrayPropertyDescriptor)
 
- Protected Attributes inherited from UE::Net::Private::FNativeFastArrayReplicationFragmentBase
TRefCountPtr< const FReplicationStateDescriptorReplicationStateDescriptor
 
UObjectOwner
 
SIZE_T WrappedArrayOffsetRelativeFastArraySerializerProperty
 
- Protected Attributes inherited from UE::Net::FReplicationFragment
EReplicationFragmentTraits Traits
 

Detailed Description

template<typename FastArrayItemType, typename FastArrayType, typename PollingPolicyType = FastArrayPollingPolicies::FNoPollingPolicy>
class UE::Net::TNativeFastArrayReplicationFragment< FastArrayItemType, FastArrayType, PollingPolicyType >

TNativeFastArrayReplicationFragment - Binds a typed FastArray to a FReplicationfragments Used to support FFastArray-based serialization with some minor code modifications The FastArray must be changed to inherit from IrisFastArraySerializer instead of FFastArraySerializer which will inject a ReplicationStateHeader and a fixed size changemask, in it most basic form this allows us to not keep a full copy the fast array to detect dirtiness but instead only store the ReplicationID and ReplicationKeys. We can also provide an alternative interface for editing the FastArrays which allows us update dirtiness directly and skip the poll step completely.

Member Typedef Documentation

◆ ItemArrayType

template<typename FastArrayItemType , typename FastArrayType , typename PollingPolicyType = FastArrayPollingPolicies::FNoPollingPolicy>
typedef TArray<FastArrayItemType> UE::Net::TNativeFastArrayReplicationFragment< FastArrayItemType, FastArrayType, PollingPolicyType >::ItemArrayType

Constructor & Destructor Documentation

◆ TNativeFastArrayReplicationFragment()

template<typename FastArrayItemType , typename FastArrayType , typename PollingPolicyType >
UE::Net::TNativeFastArrayReplicationFragment< FastArrayItemType, FastArrayType, PollingPolicyType >::TNativeFastArrayReplicationFragment ( EReplicationFragmentTraits  InTraits,
UObject InOwner,
const FReplicationStateDescriptor InDescriptor 
)

Member Function Documentation

◆ ApplyReplicatedState()

template<typename FastArrayItemType , typename FastArrayType , typename PollingPolicyType >
void UE::Net::TNativeFastArrayReplicationFragment< FastArrayItemType, FastArrayType, PollingPolicyType >::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.

◆ CallRepNotifies()

template<typename FastArrayItemType , typename FastArrayType , typename PollingPolicyType >
void UE::Net::TNativeFastArrayReplicationFragment< FastArrayItemType, FastArrayType, PollingPolicyType >::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.

◆ GetFastArraySerializerFromOwner()

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

◆ IsDirty()

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

◆ PollAllState()

template<typename FastArrayItemType , typename FastArrayType , typename PollingPolicyType >
bool UE::Net::TNativeFastArrayReplicationFragment< FastArrayItemType, FastArrayType, PollingPolicyType >::PollAllState ( )
protected

◆ PollReplicatedState()

template<typename FastArrayItemType , typename FastArrayType , typename PollingPolicyType >
bool UE::Net::TNativeFastArrayReplicationFragment< FastArrayItemType, FastArrayType, PollingPolicyType >::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.

◆ Register()

template<typename FastArrayItemType , typename FastArrayType , typename PollingPolicyType >
void UE::Net::TNativeFastArrayReplicationFragment< FastArrayItemType, FastArrayType, PollingPolicyType >::Register ( FFragmentRegistrationContext Fragments,
EReplicationFragmentTraits  Traits = EReplicationFragmentTraits::None 
)

◆ ReplicatedStateToString()

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

Optional method to output state data to StringBuilder.

Reimplemented from UE::Net::FReplicationFragment.


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