Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/Containers
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 InAllocator>
class TMRUArray : public TArray< T, InAllocator >
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
| Type | Name | Description | |
|---|---|---|---|
| int32 | MaxItems | The maximum number of items we can store in this array. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
TMRUArray () |
Constructor. | ||
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | Add
(
const T& Item |
Adds item to the array. Makes sure that we don't add more than the limit. | |
| int32 | AddUnique
(
const T& Item |
Adds unique item to the array. | |
| int32 | AddZeroed
(
int32 Count |
Adds a number of zeroed elements to the array. Makes sure that we don't add more than the limit. | |
| void | CullArray () |
Makes sure that the array never gets beyond MaxItems in size. |
Operators
Typedefs
| Name | Description |
|---|---|
| Super |