UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TScriptArray< AllocatorType > Class Template Reference

#include <ScriptArray.h>

+ Inheritance diagram for TScriptArray< AllocatorType >:

Public Types

using IntrusiveUnsetOptionalStateType = TScriptArray
 

Public Member Functions

FORCEINLINE voidGetData ()
 
FORCEINLINE const voidGetData () const
 
FORCEINLINE bool IsValidIndex (int32 i) const
 
bool IsEmpty () const
 
FORCEINLINE int32 Num () const
 
FORCEINLINE int32 NumUnchecked () const
 
FORCEINLINE int32 Max () const
 
void InsertZeroed (int32 Index, int32 Count, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
void Insert (int32 Index, int32 Count, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
int32 Add (int32 Count, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
int32 AddZeroed (int32 Count, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
void Shrink (int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
void SetNumUninitialized (int32 NewNum, int32 NumBytesPerElement, uint32 AlignmentOfElement, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
 
FORCEINLINE void SetNumUninitialized (int32 NewNum, int32 NumBytesPerElement, uint32 AlignmentOfElement, bool bAllowShrinking)
 
void MoveAssign (TScriptArray &Other, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
void Empty (int32 Slack, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
void Reset (int32 NewSize, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
void SwapMemory (int32 A, int32 B, int32 NumBytesPerElement)
 
 TScriptArray ()
 
void CountBytes (FArchive &Ar, int32 NumBytesPerElement) const
 
FORCEINLINE void CheckAddress (const void *Addr, int32 NumBytesPerElement) const
 
FORCEINLINE int32 GetSlack () const
 
void Remove (int32 Index, int32 Count, int32 NumBytesPerElement, uint32 AlignmentOfElement, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
 
FORCEINLINE void Remove (int32 Index, int32 Count, int32 NumBytesPerElement, uint32 AlignmentOfElement, bool bAllowShrinking)
 
SIZE_T GetAllocatedSize (int32 NumBytesPerElement) const
 
 TScriptArray (FIntrusiveUnsetOptionalState Tag)
 
bool operator== (FIntrusiveUnsetOptionalState Tag) const
 
 TScriptArray (const TScriptArray &)
 
void operator= (const TScriptArray &)
 

Static Public Attributes

static constexpr bool bHasIntrusiveUnsetOptionalState = true
 

Protected Member Functions

 TScriptArray (int32 InNum, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
FORCENOINLINE void ResizeInit (int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
FORCENOINLINE void ResizeGrow (int32 OldNum, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
FORCENOINLINE void ResizeShrink (int32 NumBytesPerElement, uint32 AlignmentOfElement)
 
FORCENOINLINE void ResizeTo (int32 NewMax, int32 NumBytesPerElement, uint32 AlignmentOfElement)
 

Protected Attributes

int32 ArrayNum
 
int32 ArrayMax
 

Detailed Description

template<typename AllocatorType>
class TScriptArray< AllocatorType >

Base dynamic array. An untyped data array; mirrors a TArray's members, but doesn't need an exact C++ type for its elements.

Member Typedef Documentation

◆ IntrusiveUnsetOptionalStateType

template<typename AllocatorType >
using TScriptArray< AllocatorType >::IntrusiveUnsetOptionalStateType = TScriptArray

Constructor & Destructor Documentation

◆ TScriptArray() [1/4]

template<typename AllocatorType >
TScriptArray< AllocatorType >::TScriptArray ( )
inline

◆ TScriptArray() [2/4]

template<typename AllocatorType >
TScriptArray< AllocatorType >::TScriptArray ( int32  InNum,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inlineprotected

◆ TScriptArray() [3/4]

template<typename AllocatorType >
TScriptArray< AllocatorType >::TScriptArray ( FIntrusiveUnsetOptionalState  Tag)
inlineexplicit

◆ TScriptArray() [4/4]

template<typename AllocatorType >
TScriptArray< AllocatorType >::TScriptArray ( const TScriptArray< AllocatorType > &  )
inline

Member Function Documentation

◆ Add()

template<typename AllocatorType >
int32 TScriptArray< AllocatorType >::Add ( int32  Count,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

◆ AddZeroed()

template<typename AllocatorType >
int32 TScriptArray< AllocatorType >::AddZeroed ( int32  Count,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

◆ CheckAddress()

template<typename AllocatorType >
FORCEINLINE void TScriptArray< AllocatorType >::CheckAddress ( const void Addr,
int32  NumBytesPerElement 
) const
inline

◆ CountBytes()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::CountBytes ( FArchive Ar,
int32  NumBytesPerElement 
) const
inline

◆ Empty()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::Empty ( int32  Slack,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

◆ GetAllocatedSize()

template<typename AllocatorType >
SIZE_T TScriptArray< AllocatorType >::GetAllocatedSize ( int32  NumBytesPerElement) const
inline

◆ GetData() [1/2]

template<typename AllocatorType >
FORCEINLINE void * TScriptArray< AllocatorType >::GetData ( )
inline

◆ GetData() [2/2]

template<typename AllocatorType >
FORCEINLINE const void * TScriptArray< AllocatorType >::GetData ( ) const
inline

◆ GetSlack()

template<typename AllocatorType >
FORCEINLINE int32 TScriptArray< AllocatorType >::GetSlack ( ) const
inline

Returns the amount of slack in this array in elements.

◆ Insert()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::Insert ( int32  Index,
int32  Count,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

◆ InsertZeroed()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::InsertZeroed ( int32  Index,
int32  Count,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

◆ IsEmpty()

template<typename AllocatorType >
bool TScriptArray< AllocatorType >::IsEmpty ( ) const
inline

◆ IsValidIndex()

template<typename AllocatorType >
FORCEINLINE bool TScriptArray< AllocatorType >::IsValidIndex ( int32  i) const
inline

◆ Max()

template<typename AllocatorType >
FORCEINLINE int32 TScriptArray< AllocatorType >::Max ( ) const
inline
Returns
The number of elements the array can hold before reallocation.

◆ MoveAssign()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::MoveAssign ( TScriptArray< AllocatorType > &  Other,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

◆ Num()

template<typename AllocatorType >
FORCEINLINE int32 TScriptArray< AllocatorType >::Num ( ) const
inline

◆ NumUnchecked()

template<typename AllocatorType >
FORCEINLINE int32 TScriptArray< AllocatorType >::NumUnchecked ( ) const
inline

◆ operator=()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::operator= ( const TScriptArray< AllocatorType > &  )
inline

◆ operator==()

template<typename AllocatorType >
bool TScriptArray< AllocatorType >::operator== ( FIntrusiveUnsetOptionalState  Tag) const
inline

◆ Remove() [1/2]

template<typename AllocatorType >
FORCEINLINE void TScriptArray< AllocatorType >::Remove ( int32  Index,
int32  Count,
int32  NumBytesPerElement,
uint32  AlignmentOfElement,
bool  bAllowShrinking 
)
inline

◆ Remove() [2/2]

template<typename AllocatorType >
void TScriptArray< AllocatorType >::Remove ( int32  Index,
int32  Count,
int32  NumBytesPerElement,
uint32  AlignmentOfElement,
EAllowShrinking  AllowShrinking = UE::Core::Private::AllowShrinkingByDefault<AllocatorType>() 
)
inline

◆ Reset()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::Reset ( int32  NewSize,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

◆ ResizeGrow()

template<typename AllocatorType >
FORCENOINLINE void TScriptArray< AllocatorType >::ResizeGrow ( int32  OldNum,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inlineprotected

◆ ResizeInit()

template<typename AllocatorType >
FORCENOINLINE void TScriptArray< AllocatorType >::ResizeInit ( int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inlineprotected

◆ ResizeShrink()

template<typename AllocatorType >
FORCENOINLINE void TScriptArray< AllocatorType >::ResizeShrink ( int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inlineprotected

◆ ResizeTo()

template<typename AllocatorType >
FORCENOINLINE void TScriptArray< AllocatorType >::ResizeTo ( int32  NewMax,
int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inlineprotected

◆ SetNumUninitialized() [1/2]

template<typename AllocatorType >
FORCEINLINE void TScriptArray< AllocatorType >::SetNumUninitialized ( int32  NewNum,
int32  NumBytesPerElement,
uint32  AlignmentOfElement,
bool  bAllowShrinking 
)
inline

◆ SetNumUninitialized() [2/2]

template<typename AllocatorType >
void TScriptArray< AllocatorType >::SetNumUninitialized ( int32  NewNum,
int32  NumBytesPerElement,
uint32  AlignmentOfElement,
EAllowShrinking  AllowShrinking = UE::Core::Private::AllowShrinkingByDefault<AllocatorType>() 
)
inline

◆ Shrink()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::Shrink ( int32  NumBytesPerElement,
uint32  AlignmentOfElement 
)
inline

◆ SwapMemory()

template<typename AllocatorType >
void TScriptArray< AllocatorType >::SwapMemory ( int32  A,
int32  B,
int32  NumBytesPerElement 
)
inline

Member Data Documentation

◆ ArrayMax

template<typename AllocatorType >
int32 TScriptArray< AllocatorType >::ArrayMax
protected

◆ ArrayNum

template<typename AllocatorType >
int32 TScriptArray< AllocatorType >::ArrayNum
protected

◆ bHasIntrusiveUnsetOptionalState

template<typename AllocatorType >
constexpr bool TScriptArray< AllocatorType >::bHasIntrusiveUnsetOptionalState = true
staticconstexpr

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