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

#include <ManagedArray.h>

+ Inheritance diagram for TManagedArrayBase< InElementType >:

Public Types

using ElementType = InElementType
 
typedef TArray< InElementType >::RangedForIteratorType RangedForIteratorType
 
typedef TArray< InElementType >::RangedForConstIteratorType RangedForConstIteratorType
 

Public Member Functions

FORCEINLINE TManagedArrayBase ()
 
FORCEINLINE TManagedArrayBase (const TArray< ElementType > &Other)
 
FORCEINLINE TManagedArrayBase (const TManagedArrayBase< ElementType > &Other)=delete
 
FORCEINLINE TManagedArrayBase (TManagedArrayBase< ElementType > &&Other)
 
FORCEINLINE TManagedArrayBase (TArray< ElementType > &&Other)
 
FORCEINLINE TManagedArrayBaseoperator= (TManagedArrayBase< ElementType > &&Other)
 
FORCEINLINE TManagedArrayBaseoperator= (TArray< ElementType > &&Other)
 
virtual ~TManagedArrayBase ()
 
virtual void RemoveElements (const TArray< int32 > &SortedDeletionList) override
 
virtual void Init (const FManagedArrayBase &NewArray) override
 
virtual SIZE_T GetAllocatedSize () const override
 
virtual void CopyRange (const FManagedArrayBase &ConstArray, int32 Start, int32 Stop, int32 Offset=0) override
 
void Fill (const ElementType &Value)
 
virtual void ExchangeArrays (FManagedArrayBase &NewArray) override
 
FORCEINLINE ElementTypeoperator[] (int Index)
 
FORCEINLINE const ElementTypeoperator[] (int Index) const
 
FORCEINLINE const TArray< ElementType > & GetConstArray ()
 
FORCEINLINE const TArray< ElementType > & GetConstArray () const
 
FORCEINLINE ElementTypeGetData ()
 
FORCEINLINE const ElementTypeGetData () const
 
FORCEINLINE size_t GetTypeSize () const override
 
FORCEINLINE int32 Num () const override
 
FORCEINLINE int32 Max () const override
 
FORCEINLINE bool Contains (const ElementType &Item) const
 
int32 Find (const ElementType &Item) const
 
int32 Count (const ElementType &Item) const
 
FORCEINLINE bool IsValidIndex (int32 Index) const
 
FORCEINLINE void RangeCheck (int32 Index) const
 
virtual void Serialize (Chaos::FChaosArchive &Ar)
 
FORCEINLINE uint32 GetTypeHash () const
 
FORCEINLINE RangedForIteratorType begin ()
 
FORCEINLINE RangedForConstIteratorType begin () const
 
FORCEINLINE RangedForIteratorType end ()
 
FORCEINLINE RangedForConstIteratorType end () const
 
- Public Member Functions inherited from FManagedArrayBase
 FManagedArrayBase ()
 
virtual ~FManagedArrayBase ()
 
FORCEINLINE void ClearDirtyFlag ()
 
FORCEINLINE_DEBUGGABLE void MarkDirty ()
 
FORCEINLINE bool IsDirty () const
 
virtual void Reindex (const TArray< int32 > &Offsets, const int32 &FinalSize, const TArray< int32 > &SortedDeletionList, const TSet< int32 > &DeletionSet)
 

Protected Member Functions

void Resize (const int32 Size)
 
void Reserve (const int32 Size)
 
void Empty ()
 
void Reorder (const TArray< int32 > &NewOrder) override
 
- Protected Member Functions inherited from FManagedArrayBase
virtual void ReindexFromLookup (const TArray< int32 > &InverseNewOrder)
 
virtual void Convert (const FManagedArrayBase &)
 
virtual void SetDefaults (uint32 StartSize, uint32 NumElements, bool bHasGroupIndexDependency)
 
- Protected Member Functions inherited from FNoncopyable
 FNoncopyable ()
 
 ~FNoncopyable ()
 

Protected Attributes

TArray< InElementTypeArray
 

Member Typedef Documentation

◆ ElementType

template<class InElementType >
using TManagedArrayBase< InElementType >::ElementType = InElementType

◆ RangedForConstIteratorType

template<class InElementType >
typedef TArray<InElementType>::RangedForConstIteratorType TManagedArrayBase< InElementType >::RangedForConstIteratorType

◆ RangedForIteratorType

template<class InElementType >
typedef TArray<InElementType>::RangedForIteratorType TManagedArrayBase< InElementType >::RangedForIteratorType

Constructor & Destructor Documentation

◆ TManagedArrayBase() [1/5]

Constructor (default) Build an empty shared array

◆ TManagedArrayBase() [2/5]

Constructor (TArray)

◆ TManagedArrayBase() [3/5]

Copy Constructor (default)

◆ TManagedArrayBase() [4/5]

Move Constructor

◆ TManagedArrayBase() [5/5]

◆ ~TManagedArrayBase()

template<class InElementType >
virtual TManagedArrayBase< InElementType >::~TManagedArrayBase ( )
inlinevirtual

Virtual Destructor

Member Function Documentation

◆ begin() [1/2]

DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support.

◆ begin() [2/2]

◆ Contains()

template<class InElementType >
FORCEINLINE bool TManagedArrayBase< InElementType >::Contains ( const ElementType Item) const
inline

◆ CopyRange()

template<class InElementType >
virtual void TManagedArrayBase< InElementType >::CopyRange ( const FManagedArrayBase ConstArray,
int32  Start,
int32  Stop,
int32  Offset = 0 
)
inlineoverridevirtual

Copy from a predefined Array of matching type

Reimplemented from FManagedArrayBase.

◆ Count()

template<class InElementType >
int32 TManagedArrayBase< InElementType >::Count ( const ElementType Item) const
inline

Count the number of entries match Item.

◆ Empty()

template<class InElementType >
void TManagedArrayBase< InElementType >::Empty ( )
inlineprotectedvirtual

Protected clear to prevent external clearing of the array

Reimplemented from FManagedArrayBase.

◆ end() [1/2]

◆ end() [2/2]

◆ ExchangeArrays()

template<class InElementType >
virtual void TManagedArrayBase< InElementType >::ExchangeArrays ( FManagedArrayBase Src)
inlineoverridevirtual

Perform a memory move between the two arrays

Implements FManagedArrayBase.

◆ Fill()

template<class InElementType >
void TManagedArrayBase< InElementType >::Fill ( const ElementType Value)
inline

Fill the array with Value.

◆ Find()

template<class InElementType >
int32 TManagedArrayBase< InElementType >::Find ( const ElementType Item) const
inline

Find first index of the element

◆ GetAllocatedSize()

template<class InElementType >
virtual SIZE_T TManagedArrayBase< InElementType >::GetAllocatedSize ( ) const
inlineoverridevirtual

Get allocated memory

Reimplemented from FManagedArrayBase.

◆ GetConstArray() [1/2]

template<class InElementType >
FORCEINLINE const TArray< ElementType > & TManagedArrayBase< InElementType >::GetConstArray ( )
inline

Helper function for returning the internal const array

Returns
const array of all the elements

◆ GetConstArray() [2/2]

template<class InElementType >
FORCEINLINE const TArray< ElementType > & TManagedArrayBase< InElementType >::GetConstArray ( ) const
inline

◆ GetData() [1/2]

template<class InElementType >
FORCEINLINE ElementType * TManagedArrayBase< InElementType >::GetData ( )
inline

Helper function for returning a typed pointer to the first array entry.

Returns
Pointer to first array entry or nullptr if ArrayMax == 0.

◆ GetData() [2/2]

template<class InElementType >
FORCEINLINE const ElementType * TManagedArrayBase< InElementType >::GetData ( ) const
inline

Helper function for returning a typed pointer to the first array entry.

Returns
Pointer to first array entry or nullptr if ArrayMax == 0.

◆ GetTypeHash()

template<class InElementType >
FORCEINLINE uint32 TManagedArrayBase< InElementType >::GetTypeHash ( ) const
inline

This hash is using HashCombineFast and should not be serialized!

◆ GetTypeSize()

template<class InElementType >
FORCEINLINE size_t TManagedArrayBase< InElementType >::GetTypeSize ( ) const
inlineoverridevirtual

Helper function returning the size of the inner type.

Returns
Size in bytes of array type.

Reimplemented from FManagedArrayBase.

◆ Init()

template<class InElementType >
virtual void TManagedArrayBase< InElementType >::Init ( const FManagedArrayBase NewArray)
inlineoverridevirtual

Init from a predefined Array of matching type

Reimplemented from FManagedArrayBase.

◆ IsValidIndex()

template<class InElementType >
FORCEINLINE bool TManagedArrayBase< InElementType >::IsValidIndex ( int32  Index) const
inline

return true if index is in array range.

Parameters
IndexIndex to check.

◆ Max()

template<class InElementType >
FORCEINLINE int32 TManagedArrayBase< InElementType >::Max ( ) const
inlineoverridevirtual

The reserved length of the array.

Reimplemented from FManagedArrayBase.

◆ Num()

template<class InElementType >
FORCEINLINE int32 TManagedArrayBase< InElementType >::Num ( ) const
inlineoverridevirtual

Returning the size of the array

Returns
Array size

Reimplemented from FManagedArrayBase.

◆ operator=() [1/2]

template<class InElementType >
FORCEINLINE TManagedArrayBase & TManagedArrayBase< InElementType >::operator= ( TArray< ElementType > &&  Other)
inline

◆ operator=() [2/2]

Assignment operator

◆ operator[]() [1/2]

template<class InElementType >
FORCEINLINE ElementType & TManagedArrayBase< InElementType >::operator[] ( int  Index)
inline

Returning a reference to the element at index.

Returns
Array element reference

◆ operator[]() [2/2]

template<class InElementType >
FORCEINLINE const ElementType & TManagedArrayBase< InElementType >::operator[] ( int  Index) const
inline

◆ RangeCheck()

template<class InElementType >
FORCEINLINE void TManagedArrayBase< InElementType >::RangeCheck ( int32  Index) const
inline

Checks if index is in array range.

Parameters
IndexIndex to check.

◆ RemoveElements()

template<class InElementType >
virtual void TManagedArrayBase< InElementType >::RemoveElements ( const TArray< int32 > &  SortedDeletionList)
inlineoverridevirtual

Remove elements

Reimplemented from FManagedArrayBase.

◆ Reorder()

template<class InElementType >
void TManagedArrayBase< InElementType >::Reorder ( const TArray< int32 > &  NewOrder)
inlineoverrideprotectedvirtual

Reorder elements given a new ordering. Sizes must match

Parameters
NewOrderMapping from indices in the new array -> indices in the old array

Implements FManagedArrayBase.

◆ Reserve()

template<class InElementType >
void TManagedArrayBase< InElementType >::Reserve ( const int32  Size)
inlineprotectedvirtual

Protected Reserve to prevent external reservation of the array

Parameters
Newarray reservation size.

Reimplemented from FManagedArrayBase.

◆ Resize()

template<class InElementType >
void TManagedArrayBase< InElementType >::Resize ( const int32  Size)
inlineprotectedvirtual

Protected Resize to prevent external resizing of the array

Parameters
Newarray size.

Reimplemented from FManagedArrayBase.

◆ Serialize()

template<class InElementType >
virtual void TManagedArrayBase< InElementType >::Serialize ( Chaos::FChaosArchive Ar)
inlinevirtual

Serialization Support

Parameters
Chaos::FChaosArchive&Ar

Reimplemented from FManagedArrayBase.

Member Data Documentation

◆ Array

template<class InElementType >
TArray<InElementType> TManagedArrayBase< InElementType >::Array
protected

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