![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <SlateElementSortedArray.h>
Public Types | |
| using | SizeType = typename DataType::SizeType |
| using | ElementType = InElementType |
| using | ElementParamType = typename TCallTraits< ElementType >::ParamType |
| using | SortPredicate = TLess<> |
| using | RangedForConstIteratorType = typename DataType::RangedForConstIteratorType |
Public Member Functions | |
| FORCEINLINE ElementParamType | operator[] (SizeType Index) const |
| FORCEINLINE void | Empty (SizeType ExpectedNumElements=0) |
| FORCEINLINE bool | IsValidIndex (SizeType Index) const |
| FORCEINLINE SizeType | Num () const |
| SizeType | Find (ElementParamType Item) const |
| bool | Contains (ElementParamType Item) const |
| SizeType | FindLowerBound (ElementParamType Value) const |
| SizeType | FindUpperBound (ElementParamType Value) const |
| SizeType | InsertUnique (ElementParamType Item) |
| FORCEINLINE SizeType | AddUnsorted (ElementType Item) |
| SizeType | RemoveSingle (ElementParamType Item) |
| template<typename CountType > | |
| FORCEINLINE void | RemoveAt (SizeType Index, CountType Count) |
| void | Sort () |
| FORCEINLINE RangedForConstIteratorType | begin () const |
| FORCEINLINE RangedForConstIteratorType | end () const |
An Array of elements that are always sorted.
| using TSlateElementSortedArray< InElementType, InSortPredicate >::ElementParamType = typename TCallTraits<ElementType>::ParamType |
| using TSlateElementSortedArray< InElementType, InSortPredicate >::ElementType = InElementType |
| using TSlateElementSortedArray< InElementType, InSortPredicate >::RangedForConstIteratorType = typename DataType::RangedForConstIteratorType |
DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support.
| using TSlateElementSortedArray< InElementType, InSortPredicate >::SizeType = typename DataType::SizeType |
| using TSlateElementSortedArray< InElementType, InSortPredicate >::SortPredicate = TLess<> |
|
inline |
Adds a new item to the end of the array. The array needs to be sorted manually after. Use when multiple insertion is needed and it would be faster to sort the array once.
| Item | The item to add |
|
inline |
|
inline |
Checks if this array contains the element.
| Item | Item to look for. |
|
inline |
Removes all elements from the array, potentially leaving space allocated for an expected number of elements about to be added.
|
inline |
|
inline |
Binary searches the element within the array.
| Item | Item to look for. |
|
inline |
|
inline |
|
inline |
Adds a new item to the array at the sorted location if it doesn't exist, possibly reallocating the whole array to fit.
| Item | The item to add |
|
inline |
|
inline |
|
inline |
|
inline |
Removes an element (or elements) at given location optionally shrinking the array.
| Index | Location in array of the element to remove. |
| Count | (Optional) Number of elements to remove. Default is 1. |
| bAllowShrinking | (Optional) Tells if this call can shrink array if suitable after remove. Default is true. |
|
inline |
Removes the first occurrence of the specified item in the array, maintaining order but not indices.
| Item | The item to remove. |
|
inline |
Sorts the array using the SortPredicate.