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

Select Skin
Light
Dark

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