TBasicArray

Basic RAII array which can be used without the excessive dependencies needed by [TArray](API\Runtime\Core\Containers\TArray), which needs to be serialisable, have a fixed ABI, have lots of helper algorithms as members, have auto-shrinking, support allocators etc.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

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

Include

#include "Containers/BasicArray.h"

Syntax

template<typename T>
class TBasicArray

Remarks

Basic RAII array which can be used without the excessive dependencies needed by TArray, which needs to be serialisable, have a fixed ABI, have lots of helper algorithms as members, have auto-shrinking, support allocators etc.

Constructors

Name Description

Public function

TBasicArray()

Public function

TBasicArray

(
    const TBasicArray&
)

Non-copyable for now, but this could be made copyable in future if needed.

Public function

TBasicArray

(
    TBasicArray&& Other
)

Destructors

Name Description

Public function

~TBasicArray()

Functions

Name Description

Public function

int32

 

Emplace

(
    ArgTypes&&... Args
)

Public function

void

 

EmplaceAt

(
    int32 Index,
    ArgTypes&&... Args
)

Public function

T *

 

GetData()

Public function Const

const T *...

 

GetData()

Public function Const

bool

 

IsEmpty()

Public function Const

int32

 

Num()

Public function

void

 

RemoveAt

(
    int32 Index,
    int32 NumToRemove
)

Operators

Name Description

Public function

T &

 

operator[]

(
    int32 Index
)

Public function Const

const T &

 

operator[]

(
    int32 Index
)

Public function

TBasicArray ...

 

operator=

(
    const TBasicArray&
)

Public function

TBasicArray ...

 

operator=

(
    TBasicArray&& Other
)

Constants

Name

Description

InitialReservationSize