![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <UniquePointerArray.h>
Inheritance diagram for uLang::TUPtrArrayG< InElementType, AllowNull, InElementAllocatorType, RawAllocatorArgsType >:Public Types | |
| using | ElementType = InElementType |
| using | ElementAllocatorType = InElementAllocatorType |
| using | PointerType = TUPtrG< ElementType, AllowNull, typename InElementAllocatorType::RawAllocatorType, RawAllocatorArgsType... > |
| using | PointerStorageType = TArrayG< ElementType *, InElementAllocatorType, RawAllocatorArgsType... > |
Protected Member Functions | |
| ULANG_FORCEINLINE void | Delete (int32_t Index) |
| ULANG_FORCEINLINE void | DeleteRange (int32_t BeginIndex, int32_t EndIndex) |
| ULANG_FORCEINLINE void | DeleteAll () |
Protected Attributes | |
| PointerStorageType | _PointerStorage |
Friends | |
| template<typename OtherElementType , bool OtherAllowNull, typename OtherElementAllocatorType , typename... OtherRawAllocatorArgsType> | |
| class | TUPtrArrayG |
Templated dynamic array of unique pointers to elements
| using uLang::TUPtrArrayG< InElementType, AllowNull, InElementAllocatorType, RawAllocatorArgsType >::ElementAllocatorType = InElementAllocatorType |
| using uLang::TUPtrArrayG< InElementType, AllowNull, InElementAllocatorType, RawAllocatorArgsType >::ElementType = InElementType |
| using uLang::TUPtrArrayG< InElementType, AllowNull, InElementAllocatorType, RawAllocatorArgsType >::PointerStorageType = TArrayG<ElementType *, InElementAllocatorType, RawAllocatorArgsType...> |
| using uLang::TUPtrArrayG< InElementType, AllowNull, InElementAllocatorType, RawAllocatorArgsType >::PointerType = TUPtrG<ElementType, AllowNull, typename InElementAllocatorType::RawAllocatorType, RawAllocatorArgsType...> |
|
inline |
Constructor
|
inline |
Move constructor.
| Other | Array to move from. |
|
inline |
Move constructor.
| Other | Array to move from. |
| ExtraSlack | Tells how much extra pointer memory should be preallocated at the end of the array in the number of elements. |
|
inline |
Destructor.
|
inline |
|
inline |
Constructs a new item at the end of the array, possibly reallocating the whole array to fit.
| Args | The arguments to forward to the constructor of the new item. |
|
inline |
|
inline |
Adds new items to the end of the array, possibly reallocating the whole array to fit. The new items will be zeroed.
Caution, AddZeroed() will create elements without calling the constructor and this is not appropriate for element types that require a constructor to function properly.
| Count | The number of new items to add. |
|
inline |
|
inline |
Casts TUPtrArray<T>& -> TUPtrArray& if T is castable to U.
|
inline |
|
inline |
DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support.
|
inline |
|
inline |
Checks if this array contains the exact pointer.
|
inline |
Checks if this array contains the element.
|
inline |
|
inlineprotected |
Delete a single element
|
inlineprotected |
Delete all elements
|
inlineprotected |
Delete a range of elements
|
inline |
Empties the array. It calls the destructors on held items if needed.
| Slack | (Optional) The expected usage size after empty operation. Default is 0. |
|
inline |
|
inline |
|
inline |
Finds element within the array (by address comparison).
| Item | Item to look for. |
|
inline |
Finds element within the array (by address comparison).
| Item | Item to look for. |
| Index | Will contain the found index. |
|
inline |
Finds an item by key (assuming the ElementType overloads operator== for the comparison).
| Key | The key to search by. |
|
inline |
Finds an element which matches a predicate functor.
| Pred | The functor to apply to each element, taking const pointer to array element. |
|
inline |
Finds element within the array starting from the end (by address comparison).
| Item | Item to look for. |
|
inline |
Finds element within the array starting from the end (by address comparison).
| Item | Item to look for. |
| Index | Output parameter. Found index. |
|
inline |
Searches the array for the last occurrence of an element which matches the specified predicate.
| Pred | Predicate taking const pointer to array element and returns true if element matches search criteria, false otherwise. |
|
inline |
Searches an initial subrange of the array for the last occurrence of an element which matches the specified predicate.
| Pred | Predicate taking const pointer to array element and returns true if element matches search criteria, false otherwise. |
| Count | The number of elements from the front of the array through which to search. |
|
inline |
|
inline |
Finds an item by key (assuming the ElementType overloads operator== for the comparison).
| Key | The key to search by. |
|
inline |
Finds an item by predicate.
| Pred | The predicate to match, taking const pointer to array element. |
|
inline |
|
inline |
Inserts given elements into the array at given location.
| Items | Array of elements to insert. |
| InIndex | Tells where to insert the new elements. |
|
inline |
Constructs a new item at a specified index, possibly reallocating the whole array to fit.
| Index | The index to add the item at. |
| Args | The arguments to forward to the constructor of the new item. |
|
inline |
Inserts a given number of zeroed elements into the array at given location.
Caution, InsertZeroed() will create elements without calling the constructor and this is not appropriate for element types that require a constructor to function properly.
| Index | Tells where to insert the new elements. |
| Count | Number of elements to add. |
|
inline |
Returns true if no elements in array
|
inline |
|
inline |
Tests if index is valid, i.e. greater than or equal to zero, and less than the number of elements in the array.
| Index | Index to test. |
|
inline |
Returns n-th last element from the array.
| IndexFromTheEnd | (Optional) Index from the end of array (default = 0). |
|
inline |
Returns maximum number of elements in array.
|
inline |
|
inline |
Appends the specified array to this array. Cannot append to self.
Move semantics version.
| Other | The array to append. |
|
inline |
Move assignment operator.
| Other | Array to assign and move from. |
|
inline |
Array bracket operator. Returns naked pointer to element at given index.
|
inline |
Pops element from the array.
| bAllowShrinking | If this call allows shrinking of the array during element remove. |
|
inline |
Pushes element into the array.
| Item | Item to push. |
|
inline |
Remove all instances that match the predicate, maintaining order but not indices Optimized to work with runs of matches/non-matches
| Pred | Predicate, taking const pointer to array element |
|
inline |
Remove all instances that match the predicate
| Pred | Predicate, taking const pointer to array element |
|
inline |
Removes an element (or elements) at given location optionally shrinking the array.
| Index | Location in array of the element to remove. |
|
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 an element (or elements) at given location optionally shrinking the array.
This version is much more efficient than RemoveAt (O(Count) instead of O(ArrayNum)), but does not preserve the order.
| 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 an element (or elements) at given location optionally shrinking the array.
This version is much more efficient than RemoveAt (O(Count) instead of O(ArrayNum)), but does not preserve the order.
| 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 |
|
inline |
Reserves memory such that the array can contain at least Number elements.
| Number | The number of elements that the array should be able to contain after allocation. |
|
inline |
Same as empty, but doesn't change memory allocations, unless the new size is larger than the current array. It calls the destructors on held items if needed and then zeros the ArrayNum.
| NewSize | The expected usage size after calling this function. |
|
inline |
Resizes array to given number of elements. New elements will be zeroed.
| NewNum | New size of the array. |
|
inline |
Shrinks the array's used pointer memory to smallest possible to store elements currently in it.
|
inline |
Sorts the array assuming < operator is defined for ElementType.
|
inline |
Sorts the array using user define predicate class.
| Predicate | Predicate instance or lambda, taking const pointer to array element |
|
inline |
|
friend |
|
protected |