FScriptArray

Base dynamic array.

Windows
MacOS
Linux

Inheritance Hierarchy

Syntax

class FScriptArray : protected FHeapAllocator::ForAnyElementType

Remarks

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

Variables

Name Description

Protected variable

int32

 

ArrayMax

Protected variable

int32

 

ArrayNum

Constructors

Name Description

Public function

FScriptArray()

Public function

FScriptArray

(
    const FScriptArray&
)

These should really be private, because they shouldn't be called, but there's a bunch of code that needs to be fixed first.

Protected function

FScriptArray

(
    int32 InNum,
    int32 NumBytesPerElement
)

Functions

Name Description

Public function

int32

 

Add

(
    int32 Count,
    int32 NumBytesPerElement
)

Public function

int32

 

AddZeroed

(
    int32 Count,
    int32 NumBytesPerElement
)

Public function

void

 

CountBytes

(
    FArchive& Ar,
    int32 NumBytesPerElement
)

Public function

void

 

Empty

(
    int32 Slack,
    int32 NumBytesPerElement
)

Public function

void *

 

GetData()

Public function Const

const void &...

 

GetData()

Public function Const

int32

 

GetSlack()

Returns the amount of slack in this array in elements.

Public function

void

 

Insert

(
    int32 Index,
    int32 Count,
    int32 NumBytesPerElement
)

Public function

void

 

InsertZeroed

(
    int32 Index,
    int32 Count,
    int32 NumBytesPerElement
)

Public function Const

bool

 

IsValidIndex

(
    int32 i
)

Public function Const

int32

 

Num()

Public function

void

 

Remove

(
    int32 Index,
    int32 Count,
    int32 NumBytesPerElement
)

Protected function

void

 

ResizeGrow

(
    int32 OldNum,
    int32 NumBytesPerElement
)

Protected function

void

 

ResizeInit

(
    int32 NumBytesPerElement
)

Protected function

void

 

ResizeShrink

(
    int32 NumBytesPerElement
)

Protected function

void

 

ResizeTo

(
    int32 NewMax,
    int32 NumBytesPerElement
)

Public function

void

 

Shrink

(
    int32 NumBytesPerElement
)

Public function

void

 

SwapMemory

(
    int32 A,
    int32 B,
    int32 NumBytesPerElement
)

Operators

Name Description

Public function

void

 

operator=

(
    const FScriptArray&
)

References

Module

Core

Header

Runtime/Core/Public/Containers/ScriptArray.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback