TMRUArray

Inheritance Hierarchy

TArray

TMRUArray

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

References

Module

Core

Header

Runtime/Core/Public/Containers/MRUArray.h