TIndirectArray

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/IndirectArray.h

Include

#include "Containers/IndirectArray.h"

Syntax

template<typename T, typename Allocator>
class TIndirectArray

Constructors

Name Description

Public function

TIndirectArray()

Default constructors.

Public function

TIndirectArray

(
    TIndirectArray&&
)

Public function

TIndirectArray

(
    const TIndirectArray& Other
)

Copy constructor.

Destructors

Name Description

Public function

~TIndirectArray()

Destructor.

Functions

Name Description

Public function

int32

 

Add

(
    T* Item
)

Adds a new item to the end of the array, possibly reallocating the whole array to fit.

Public function Const

TDereferenci...

 

begin()

Public function

TDereferenci...

 

begin()

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

Public function Const

void

 

CountBytes

(
    FArchive& Ar
)

Count bytes needed to serialize this array.

Public function Const

TConstIterat...

 

CreateConstIterator()

Creates a const iterator for the contents of this array.

Public function

TIterator

 

CreateIterator()

Creates an iterator for the contents of this array.

Public function

void

 

Empty

(
    int32 Slack
)

Empties the array. It calls the destructors on held items.

Public function Const

TDereferenci...

 

end()

Public function

TDereferenci...

 

end()

Public function Const

SIZE_T

 

GetAllocatedSize()

Helper function to return the amount of memory allocated by this container

Public function Const

const T *...

 

GetData()

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

Public function

T **

 

GetData()

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

Public function Const

uint32

 

GetTypeSize()

Helper function returning the size of the inner type.

Public function

void

 

Insert

(
    T* Item,
    int32 Index
)

Inserts a given element into the array at given location.

Public function Const

bool

 

IsValidIndex

(
    int32 Index
)

Tests if index is valid, i.e. greater than zero and less than number of elements in array.

Public function Const

const Elemen...

 

Last

(
    int32 IndexFromTheEnd
)

Returns n-th last element from the array.

Const version.

Public function

ElementType ...

 

Last

(
    int32 IndexFromTheEnd
)

Returns n-th last element from the array.

Public function Const

int32

 

Num()

Gets number of elements in array.

Public function

void

 

RemoveAt

(
    int32 Index,
    int32 Count,
    bool bAllowShrinking
)

Removes an element (or elements) at given location optionally shrinking the array.

Public function

void

 

RemoveAtSwap

(
    int32 Index,
    int32 Count,
    bool bAllowShrinking
)

Removes an element (or elements) at given location optionally shrinking the array.

Public function

void

 

Reserve

(
    int32 Number
)

Reserves memory such that the array can contain at least Number elements.

Public function

void

 

Reset

(
    int32 NewSize
)

Resets the array to the new given size. It calls the destructors on held items.

Public function

void

 

Serialize

(
    FArchive& Ar,
    UObject* Owner
)

Special serialize function passing the owning UObject along as required by FUnytpedBulkData serialization.

Public function

void

 

Shrink()

Shrinks the array's used memory to smallest possible to store elements currently in it.

Public function

void

 

Swap

(
    int32 FirstIndexToSwap,
    int32 SecondIndexToSwap
)

Element-wise array element swap.

This version is doing more sanity checks than SwapMemory.

Operators

Name Description

Public function Const

const T &

 

operator[]

(
    int32 Index
)

Bracket array access operator.

Const version.

Public function

T &

 

operator[]

(
    int32 Index
)

Bracket array access operator.

Public function

TIndirectArr...

 

operator=

(
    TIndirectArray&& Other
)

Public function

TIndirectArr...

 

operator=

(
    const TIndirectArray& Other
)

Assignment operators.

Typedefs

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss