Navigation
API > API/Runtime > API/Runtime/uLangCore
Templated dynamic array of unique pointers to elements
| Name | TUPtrArrayG |
| Type | class |
| Header File | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Containers/UniquePointer.h |
| Include Path | #include "uLang/Common/Containers/UniquePointer.h" |
| Source | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Containers/UniquePointerArray.h |
Syntax
template<typename InElementType, bool AllowNull, typename InElementAllocatorType, typename... RawAllocatorArgsType>
class TUPtrArrayG
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINE TUPtrArrayG
(
TUPtrArrayG&& Other |
Move constructor. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE TUPtrArrayG
(
RawAllocatorArgsType&&... RawAllocatorArgs |
Constructor | uLang/Common/Containers/UniquePointerArray.h | |
TUPtrArrayG
(
TUPtrArrayG&& Other, |
Move constructor. | uLang/Common/Containers/UniquePointerArray.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~TUPtrArrayG() |
Destructor. | uLang/Common/Containers/UniquePointerArray.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ElementAllocatorType | InElementAllocatorType | uLang/Common/Containers/UniquePointerArray.h | |
| ElementType | InElementType | uLang/Common/Containers/UniquePointerArray.h | |
| PointerStorageType | TArrayG< ElementType *, InElementAllocatorType, RawAllocatorArgsType... > | uLang/Common/Containers/UniquePointerArray.h | |
| PointerType | TUPtrG< ElementType, AllowNull, typename InElementAllocatorType::RawAllocatorType, RawAllocatorArgsType... > | uLang/Common/Containers/UniquePointerArray.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINE int32_t Add
(
PointerType&& Item |
Adds a new item to the end of the array, possibly reallocating the whole array to fit. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE int32_t AddNew
(
CtorArgsType&&... CtorArgs |
Constructs a new item at the end of the array, possibly reallocating the whole array to fit. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE int32_t AddUnique
(
PointerType&& Item |
Adds unique element to array if it doesn't exist. | uLang/Common/Containers/UniquePointerArray.h | |
int32_t AddZeroed
(
int32_t Count |
Adds new items to the end of the array, possibly reallocating the whole array to fit. | uLang/Common/Containers/UniquePointerArray.h | |
void Append
(
TUPtrArrayG&& Source |
Appends the specified array to this array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINETUPtrArrayG< OtherElementType, OtherAllowNull, ElementAllocatorType, RawAllocatorArgsType... > & As () |
Casts TUPtrArray |
uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE const TUPtrArrayG< OtherElementType, OtherAllowNull, ElementAllocatorType, RawAllocatorArgsType... > & As () |
uLang/Common/Containers/UniquePointerArray.h | ||
ULANG_FORCEINLINEElementType ** begin () |
DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEElementType *const * begin () |
uLang/Common/Containers/UniquePointerArray.h | ||
bool Contains
(
const ElementType* Pointer |
Checks if this array contains the exact pointer. | uLang/Common/Containers/UniquePointerArray.h | |
bool ContainsByKey
(
const ComparisonType& Key |
Checks if this array contains the element. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE bool ContainsByPredicate
(
Predicate Pred |
Checks if this array contains element for which the predicate is true. | uLang/Common/Containers/UniquePointerArray.h | |
void Empty
(
int32_t Slack |
Empties the array. It calls the destructors on held items if needed. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEElementType *const * end () |
uLang/Common/Containers/UniquePointerArray.h | ||
ULANG_FORCEINLINEElementType ** end () |
uLang/Common/Containers/UniquePointerArray.h | ||
ULANG_FORCEINLINE int32_t Find
(
ElementType* Item |
Finds element within the array (by address comparison). | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE bool Find
(
ElementType* Item, |
Finds element within the array (by address comparison). | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEElementType * FindByKey
(
const KeyType& Key |
Finds an item by key (assuming the ElementType overloads operator== for the comparison). | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEElementType * FindByPredicate
(
Predicate Pred |
Finds an element which matches a predicate functor. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE int32_t FindLast
(
const PointerType& Item |
Finds element within the array starting from the end (by address comparison). | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE bool FindLast
(
const PointerType& Item, |
Finds element within the array starting from the end (by address comparison). | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE int32_t FindLastByPredicate
(
Predicate Pred |
Searches the array for the last occurrence of an element which matches the specified predicate. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE int32_t FindLastByPredicate
(
Predicate Pred, |
Searches an initial subrange of the array for the last occurrence of an element which matches the specified predicate. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE int32_t GetSlack () |
Returns the amount of slack in this array in elements. | uLang/Common/Containers/UniquePointerArray.h | |
int32_t IndexOfByKey
(
const KeyType& Key |
Finds an item by key (assuming the ElementType overloads operator== for the comparison). | uLang/Common/Containers/UniquePointerArray.h | |
int32_t IndexOfByPredicate
(
Predicate Pred |
Finds an item by predicate. | uLang/Common/Containers/UniquePointerArray.h | |
int32_t Insert
(
TUPtrArrayG&& Items, |
Inserts given elements into the array at given location. | uLang/Common/Containers/UniquePointerArray.h | |
int32_t Insert
(
PointerType&& Item, |
Inserts a given element into the array at given location. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE void InsertNew
(
int32_t Index, |
Constructs a new item at a specified index, possibly reallocating the whole array to fit. | uLang/Common/Containers/UniquePointerArray.h | |
void InsertZeroed
(
int32_t Index, |
Inserts a given number of zeroed elements into the array at given location. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE bool IsEmpty () |
Returns true if no elements in array | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE bool IsFilled () |
Returns true if any elements in array | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE bool IsValidIndex
(
int32_t Index |
Tests if index is valid, i.e. greater than or equal to zero, and less than the number of elements in the array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEElementType * Last
(
int32_t IndexFromTheEnd |
Returns n-th last element from the array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE int32_t Max () |
Returns maximum number of elements in array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE int32_t Num () |
Returns number of elements in array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEPointerType Pop
(
bool bAllowShrinking |
Pops element from the array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE void Push
(
PointerType&& Item |
Pushes element into the array. | uLang/Common/Containers/UniquePointerArray.h | |
int32_t RemoveAll
(
const Predicate& Pred |
Remove all instances that match the predicate, maintaining order but not indices Optimized to work with runs of matches/non-matches | uLang/Common/Containers/UniquePointerArray.h | |
void RemoveAllSwap
(
const Predicate& Pred, |
Remove all instances that match the predicate | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEPointerType RemoveAt
(
int32_t Index |
Removes an element (or elements) at given location optionally shrinking the array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE void RemoveAt
(
int32_t Index, |
Removes an element (or elements) at given location optionally shrinking the array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE void RemoveAtSwap
(
int32_t Index, |
Removes an element (or elements) at given location optionally shrinking the array. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEPointerType RemoveAtSwap
(
int32_t Index |
Removes an element (or elements) at given location optionally shrinking the array. | uLang/Common/Containers/UniquePointerArray.h | |
int32_t ReplaceAt
(
PointerType&& Item, |
Replaces a given element at a given location. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE void Reserve
(
int32_t Number |
Reserves memory such that the array can contain at least Number elements. | uLang/Common/Containers/UniquePointerArray.h | |
void Reset
(
int32_t NewSize |
Same as empty, but doesn't change memory allocations, unless the new size is larger than the current array. | uLang/Common/Containers/UniquePointerArray.h | |
void SetNumZeroed
(
int32_t NewNum, |
Resizes array to given number of elements. New elements will be zeroed. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE void Shrink () |
Shrinks the array's used pointer memory to smallest possible to store elements currently in it. | uLang/Common/Containers/UniquePointerArray.h | |
void Sort () |
Sorts the array assuming < operator is defined for ElementType. | uLang/Common/Containers/UniquePointerArray.h | |
void Sort
(
const PredicateType& Predicate |
Sorts the array using user define predicate class. | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINEElementType * Top () |
Returns the top element, i.e. the last one. | uLang/Common/Containers/UniquePointerArray.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINE void Delete
(
int32_t Index |
Delete a single element | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE void DeleteAll() |
Delete all elements | uLang/Common/Containers/UniquePointerArray.h | |
ULANG_FORCEINLINE void DeleteRange
(
int32_t BeginIndex, |
Delete a range of elements | uLang/Common/Containers/UniquePointerArray.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINEElementType * operator[]
(
int32_t Index |
Array bracket operator. Returns naked pointer to element at given index. | uLang/Common/Containers/UniquePointerArray.h | |
TUPtrArrayG & operator+=
(
TUPtrArrayG&& Other |
Appends the specified array to this array. Cannot append to self.Move semantics version. | uLang/Common/Containers/UniquePointerArray.h | |
TUPtrArrayG & operator=
(
TUPtrArrayG&& Other |
Move assignment operator. | uLang/Common/Containers/UniquePointerArray.h |