UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Net::FNetSerializerAlignedStorage Class Reference

#include <NetSerializerArrayStorage.h>

Public Types

typedef AllocationPolicies::FElementAllocationPolicy::SizeType SizeType
 

Public Member Functions

IRISCORE_API void AdjustSize (FNetSerializationContext &Context, SizeType InNum, SizeType InAlignment)
 
IRISCORE_API void Free (FNetSerializationContext &Context)
 
IRISCORE_API void Clone (FNetSerializationContext &Context, const FNetSerializerAlignedStorage &Source)
 
const uint8GetData () const
 
uint8GetData ()
 
SizeType Num () const
 
SizeType GetAlignment () const
 

Detailed Description

Helper class to manage storage of untyped dynamic storage with arbitrary alignment in quantized data. If storage is used to store elements that themselves uses dynamic allocations the user must take care to properly free and clone such elements properly prior to and/or after changing sizes. FNetSerializerAlignedStorage is only intended to be used from within Quantized replication states that requires dynamic storage as it has very specific expectations and limitations. NOTE: A NetSerializer using FNetSerializerAlignedStorage MUST specify the trait bHasDynamicState and forward appropriate calls to Clone and Free to this class. A zero constructed state is considered valid.

Member Typedef Documentation

◆ SizeType

Member Function Documentation

◆ AdjustSize()

void UE::Net::FNetSerializerAlignedStorage::AdjustSize ( FNetSerializationContext Context,
SizeType  InNum,
SizeType  InAlignment 
)

AdjustSize - Adjust the size of FNetSerializerArrayStorage as needed The state storage in which the storage is located is expected to be in a valid state which can either be zero initialized or a previous valid state

◆ Clone()

void UE::Net::FNetSerializerAlignedStorage::Clone ( FNetSerializationContext Context,
const FNetSerializerAlignedStorage Source 
)

Clone - Clone dynamic storage from Source No assumptions of the validity of the target is made, as this is typically called AFTER a memcopy is made to the target state which invalidates all dynamic data Should typically only be called from within a the implemntation of NetSerializer::CloneDynamicState()

◆ Free()

void UE::Net::FNetSerializerAlignedStorage::Free ( FNetSerializationContext Context)

Free - Free allocated memory and reset state. it is valid to pass in a zero-initialized state The state storage in which the storage is located is expected to be in a valid state which can either be zero initialized or a previous valid state. Should typically only be called from within a the implemntation of NetSerializer::FreeDynamicState()

◆ GetAlignment()

FNetSerializerAlignedStorage::SizeType UE::Net::FNetSerializerAlignedStorage::GetAlignment ( ) const
inline

◆ GetData() [1/2]

uint8 * UE::Net::FNetSerializerAlignedStorage::GetData ( )
inline

◆ GetData() [2/2]

const uint8 * UE::Net::FNetSerializerAlignedStorage::GetData ( ) const
inline

◆ Num()

FNetSerializerAlignedStorage::SizeType UE::Net::FNetSerializerAlignedStorage::Num ( ) const
inline

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