Navigation
API > API/Runtime > API/Runtime/Core
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.
| Name | TMRUArray |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Containers/MRUArray.h |
| Include Path | #include "Containers/MRUArray.h" |
Syntax
template<typename T, typename InAllocator>
class TMRUArray : public TArray< T, FDefaultAllocator >
Inheritance Hierarchy
- TArray → TMRUArray
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TMRUArray () |
Constructor. | Containers/MRUArray.h | |
| Containers/MRUArray.h | |||
| Containers/MRUArray.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Super | TArray< T, InAllocator > | Containers/MRUArray.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| MaxItems | int32 | The maximum number of items we can store in this array. | Containers/MRUArray.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 Add
(
const T& Item |
Adds item to the array. Makes sure that we don't add more than the limit. | Containers/MRUArray.h | |
int32 AddUnique
(
const T& Item |
Adds unique item to the array. | Containers/MRUArray.h | |
int32 AddZeroed
(
int32 Count |
Adds a number of zeroed elements to the array. Makes sure that we don't add more than the limit. | Containers/MRUArray.h | |
void CullArray() |
Makes sure that the array never gets beyond MaxItems in size. | Containers/MRUArray.h |