FScriptArrayHelper

[FScriptArrayHelper](API\Runtime\CoreUObject\UObject\FScriptArrayHelper): Pseudo dynamic array.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FScriptArrayHelper

FScriptArrayHelper_InContainer

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/UnrealType.h

Include

#include "UObject/UnrealType.h"

Syntax

class FScriptArrayHelper

Remarks

FScriptArrayHelper: Pseudo dynamic array. Used to work with array properties in a sensible way.

Variables

Name Description

Public variable

FFreezableScrip...

 

FreezableArray

Public variable

FScriptArray &#...

 

HeapArray

Constructors

Name Description

Public function

FScriptArrayHelper

(
    const FArrayProperty* InProper...,
    const void* InArray
)

Constructor, brings together a property and an instance of the property located in memory

Functions

Name Description

Public function

int32

 

AddUninitializedValue()

Add an uninitialized value to the end of the array.

Public function

int32

 

AddUninitializedValues

(
    int32 Count
)

Add uninitialized values to the end of the array.

Public function

int32

 

AddValue()

Add a blank, constructed values to the end of the array.

Public function

int32

 

AddValues

(
    int32 Count
)

Add blank, constructed values to the end of the array.

Public function

void

 

ClearValues

(
    int32 Index,
    int32 Count
)

Clear values in the array. The meaning of clear is defined by the property system.

Public function Const

void

 

CountBytes

(
    FArchive& Ar
)

Used by memory counting archives to accumulate the size of this array.

Public function Static

FScriptArray...

 

CreateHelperFormInnerProperty

(
    const FProperty* InInnerProper...,
    const void* InArray,
    EArrayPropertyFlags InArrayFlags
)

Public function

void

 

DestroyContainer_Unsafe()

Destroys the container object - THERE SHOULD BE NO MORE USE OF THIS HELPER AFTER THIS FUNCTION IS CALLED!

Public function

void

 

EmptyAndAddUninitializedValues

(
    int32 Count
)

Empty the array, then add uninitialized values to a given size.

Public function

void

 

EmptyAndAddValues

(
    int32 Count
)

Empty the array, then add blank, constructed values to a given size.

Public function

void

 

EmptyValues

(
    int32 Slack
)

Remove all values from the array, calling destructors, etc as appropriate.

Public function

bool

 

ExpandForIndex

(
    int32 Index
)

Expand the array, if needed, so that the given index is valid

Public function

uint8 *

 

GetRawPtr

(
    int32 Index
)

Returns a uint8 pointer to an element in the array

Public function

void

 

InsertValues

(
    int32 Index,
    int32 Count
)

Insert blank, constructed values into the array.

Public function Const

bool

 

IsValidIndex

(
    int32 Index
)

Index range check

Public function

void

 

MoveAssign

(
    void* InOtherArray
)

Move the allocation from another array and make it our own.

Public function Const

int32

 

Num()

Return the number of elements in the array.

Public function

void

 

RemoveValues

(
    int32 Index,
    int32 Count
)

Remove values from the array, calling destructors, etc as appropriate.

Public function

void

 

Resize

(
    int32 Count
)

Add or remove elements to set the array to a given size.

Public function

void

 

SwapValues

(
    int32 A,
    int32 B
)

Swap two elements in the array, does not call constructors and destructors

Enums

Name

Description

Private enum

EInternal

Deprecated Functions

Name Description

Public function Static

int32

 

Num

(
    const void* Target
)

This shortcut is no longer valid - the Num() should be read from a proper array helper