UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType > Class Template Reference

#include <NetChunkedArray.h>

+ Inheritance diagram for UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >:

Public Types

using Super = TChunkedArray< InElementType, sizeof(InElementType) *ElementsPerChunk, AllocatorType >
 
- Public Types inherited from TChunkedArray< InElementType, TargetBytesPerChunk, AllocatorType >
using IntrusiveUnsetOptionalStateType = TChunkedArray
 

Public Member Functions

 TNetChunkedArray (int32 InNumElements=0, EInitMemory InitMemory=EInitMemory::Constructor)
 
 TNetChunkedArray (const TNetChunkedArray &OtherChunkedArray)
 
TNetChunkedArrayoperator= (const TNetChunkedArray &OtherChunkedArray)
 
 TNetChunkedArray (TNetChunkedArray &&OtherChunkedArray)
 
TNetChunkedArrayoperator= (TNetChunkedArray &&OtherChunkedArray)
 
 ~TNetChunkedArray ()
 
int32 NumChunks () const
 
int32 Capacity () const
 
void Empty (int32 Slack=0)
 
void Reset (int32 NewSize=0)
 
void AddToIndexUninitialized (int32 Index)
 
void AddToIndexZeroed (int32 Index)
 
- Public Member Functions inherited from TChunkedArray< InElementType, TargetBytesPerChunk, AllocatorType >
 TChunkedArray (int32 InNumElements=0)
 
 TChunkedArray (TChunkedArray &&Other)
 
TChunkedArrayoperator= (TChunkedArray &&Other)
 
 ~TChunkedArray ()
 
 TChunkedArray (const TChunkedArray &)=default
 
TChunkedArrayoperator= (const TChunkedArray &)=default
 
 TChunkedArray (FIntrusiveUnsetOptionalState)
 
bool operator== (FIntrusiveUnsetOptionalState) const
 
ElementType & operator() (int32 ElementIndex)
 
const ElementType & operator() (int32 ElementIndex) const
 
ElementType & operator[] (int32 ElementIndex)
 
const ElementType & operator[] (int32 ElementIndex) const
 
bool IsEmpty () const
 
int32 Num () const
 
SIZE_T GetAllocatedSize (void) const
 
UE_FORCEINLINE_HINT bool IsValidIndex (int32 Index) const
 
int32 AddElement (const ElementType &Item)
 
template<typename... ArgsType>
int32 Emplace (ArgsType &&... Args)
 
TChunkedArrayoperator+= (const TArray< ElementType > &Other)
 
TChunkedArrayoperator+= (const TChunkedArray &Other)
 
int32 Add (int32 Count=1)
 
template<typename OtherAllocator >
void CopyToLinearArray (TArray< ElementType, OtherAllocator > &DestinationArray)
 
template<typename OtherAllocator >
void MoveToLinearArray (TArray< ElementType, OtherAllocator > &DestinationArray)
 
void Empty (int32 Slack=0)
 
void Reserve (int32 Number)
 
void Shrink ()
 
FIterType begin ()
 
FConstIterType begin () const
 
FIterType end ()
 
FConstIterType end () const
 

Protected Attributes

int32 NumPreAllocatedChunks = 0
 
- Protected Attributes inherited from TChunkedArray< InElementType, TargetBytesPerChunk, AllocatorType >
ChunksType Chunks
 
int32 NumElements
 

Additional Inherited Members

- Static Public Attributes inherited from TChunkedArray< InElementType, TargetBytesPerChunk, AllocatorType >
static constexpr bool bHasIntrusiveUnsetOptionalState = true
 
- Protected Types inherited from TChunkedArray< InElementType, TargetBytesPerChunk, AllocatorType >
enum  { NumElementsPerChunk = TargetBytesPerChunk / sizeof(ElementType) }
 
typedef TIndirectArray< FChunk, AllocatorType > ChunksType
 

Detailed Description

template<typename InElementType, uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
class UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >

A variation of TChunkArray that is optimized for use in the Iris networking system. The initial chunks created during construction are placed in a contiguous block of memory to promote locality of reference.

Member Typedef Documentation

◆ Super

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
using UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::Super = TChunkedArray<InElementType, sizeof(InElementType) * ElementsPerChunk, AllocatorType>

Constructor & Destructor Documentation

◆ TNetChunkedArray() [1/3]

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::TNetChunkedArray ( int32  InNumElements = 0,
EInitMemory  InitMemory = EInitMemory::Constructor 
)
inline

◆ TNetChunkedArray() [2/3]

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::TNetChunkedArray ( const TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType > &  OtherChunkedArray)
inline

◆ TNetChunkedArray() [3/3]

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::TNetChunkedArray ( TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType > &&  OtherChunkedArray)
inline

◆ ~TNetChunkedArray()

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::~TNetChunkedArray ( )
inline

Member Function Documentation

◆ AddToIndexUninitialized()

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
void UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::AddToIndexUninitialized ( int32  Index)
inline

Add elements to the array so that an index can be successfully addressed, leaving any new element's memory unitialized or initialized by the element's constructor.

Parameters
IndexThe index that must be addressable.

◆ AddToIndexZeroed()

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
void UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::AddToIndexZeroed ( int32  Index)
inline

Add elements to the array so that an index can be successfully addressed, zeroing out the memory for each new element.

Parameters
IndexThe index that must be addressable.

◆ Capacity()

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
int32 UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::Capacity ( ) const
inline

Return the maximum number of elements the array can hold before having to add another chunk.

◆ Empty()

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
void UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::Empty ( int32  Slack = 0)
inline

◆ NumChunks()

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
int32 UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::NumChunks ( ) const
inline

◆ operator=() [1/2]

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
TNetChunkedArray & UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::operator= ( const TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType > &  OtherChunkedArray)
inline

◆ operator=() [2/2]

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
TNetChunkedArray & UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::operator= ( TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType > &&  OtherChunkedArray)
inline

◆ Reset()

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
void UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::Reset ( int32  NewSize = 0)
inline

Member Data Documentation

◆ NumPreAllocatedChunks

template<typename InElementType , uint32 ElementsPerChunk = 100, typename AllocatorType = FDefaultAllocator>
int32 UE::Net::TNetChunkedArray< InElementType, ElementsPerChunk, AllocatorType >::NumPreAllocatedChunks = 0
protected

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