TMRUArray

Same as [TArray](API\Runtime\Core\Containers\TArray) except:

Windows
MacOS
Linux

Inheritance Hierarchy

TArray

TMRUArray

References

Module

Core

Header

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

Include

#include "Containers/MRUArray.h"

Syntax

template<typename T, typename Allocator>
class TMRUArray : public TArray< T, Allocator >

Remarks

Same as TArray except:

  • Has an upper limit of the number of items it will store.

  • Any item that is added to the array is moved to the top.

Variables

Name Description

Public variable

int32

 

MaxItems

The maximum number of items we can store in this array.

Constructors

Name Description

Public function

TMRUArray()

Constructor.

Public function

TMRUArray

(
    TMRUArray&&
)

Public function

TMRUArray

(
    const TMRUArray&
)

Functions

Name Description

Public function

int32

 

Add

(
    const T& Item
)

Adds item to the array. Makes sure that we don't add more than the limit.

Public function

int32

 

AddUnique

(
    const T& Item
)

Adds unique item to the array.

Public function

int32

 

AddZeroed

(
    int32 Count
)

Adds a number of zeroed elements to the array. Makes sure that we don't add more than the limit.

Public function

void

 

CullArray()

Makes sure that the array never gets beyond MaxItems in size.

Operators

Name Description

Public function

TMRUArray &

 

operator=

(
    TMRUArray&&
)

Public function

TMRUArray &

 

operator=

(
    const TMRUArray&
)

Typedefs

Name

Description

Super

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