TInlineComponentArray is simply a TArray that reserves a fixed amount of space on the stack to try to avoid heap allocation when there are fewer than a specified number of elements expected in the result. 更多...
#include <Actor.h>
类 TInlineComponentArray< T, NumElements > 继承关系图:额外继承的成员函数 | |
Public 成员函数 继承自 TArray< InElementType, InAllocator > | |
| FORCEINLINE SizeType | Add (const ElementType &Item) |
| Adds a new item to the end of the array, possibly reallocating the whole array to fit. 更多... | |
| FORCEINLINE SizeType | Add (ElementType &&Item) |
| Adds a new item to the end of the array, possibly reallocating the whole array to fit. 更多... | |
| FORCEINLINE ElementType & | Add_GetRef (const ElementType &Item) |
| Adds a new item to the end of the array, possibly reallocating the whole array to fit. 更多... | |
| FORCEINLINE ElementType & | Add_GetRef (ElementType &&Item) |
| Adds a new item to the end of the array, possibly reallocating the whole array to fit. 更多... | |
| SizeType | AddDefaulted (SizeType Count=1) |
| Adds new items to the end of the array, possibly reallocating the whole array to fit. 更多... | |
| ElementType & | AddDefaulted_GetRef () |
| Add a new item to the end of the array, possibly reallocating the whole array to fit. 更多... | |
| FORCEINLINE SizeType | AddUninitialized (SizeType Count=1) |
| Adds a given number of uninitialized elements into the array. 更多... | |
| FORCEINLINE SizeType | AddUnique (const ElementType &Item) |
| Adds unique element to array if it doesn't exist. 更多... | |
| FORCEINLINE SizeType | AddUnique (ElementType &&Item) |
| Adds unique element to array if it doesn't exist. 更多... | |
| SizeType | AddZeroed (SizeType Count=1) |
| Adds new items to the end of the array, possibly reallocating the whole array to fit. 更多... | |
| ElementType & | AddZeroed_GetRef () |
| Adds a new item to the end of the array, possibly reallocating the whole array to fit. 更多... | |
| void | Append (const ElementType *Ptr, SizeType Count) |
| Adds a raw array of elements to the end of the TArray. 更多... | |
| template<typename OtherElementType , typename OtherAllocator > | |
| void | Append (const TArray< OtherElementType, OtherAllocator > &Source) |
| Appends the specified array to this array. 更多... | |
| FORCEINLINE void | Append (std::initializer_list< ElementType > InitList) |
| Adds an initializer list of elements to the end of the TArray. 更多... | |
| template<typename OtherElementType , typename OtherAllocator > | |
| void | Append (TArray< OtherElementType, OtherAllocator > &&Source) |
| Appends the specified array to this array. 更多... | |
| FORCEINLINE RangedForIteratorType | begin () |
| DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support. | |
| void | BulkSerialize (FArchive &Ar, bool bForcePerElementSerialization=false) |
| Bulk serialize array as a single memory blob when loading. 更多... | |
| FORCEINLINE void | CheckAddress (const ElementType *Addr) const |
| Checks that the specified address is not part of an element within the container. 更多... | |
| FORCEINLINE void | CheckInvariants () const |
| Checks array invariants: if array size is greater than zero and less than maximum. | |
| template<typename ComparisonType > | |
| bool | Contains (const ComparisonType &Item) const |
| Checks if this array contains the element. 更多... | |
| template<typename Predicate > | |
| FORCEINLINE bool | ContainsByPredicate (Predicate Pred) const |
| Checks if this array contains element for which the predicate is true. 更多... | |
| void | CountBytes (FArchive &Ar) const |
| Count bytes needed to serialize this array. 更多... | |
| TConstIterator | CreateConstIterator () const |
| Creates a const iterator for the contents of this array 更多... | |
| TIterator | CreateIterator () |
| Creates an iterator for the contents of this array 更多... | |
| template<typename... ArgsType> | |
| FORCEINLINE SizeType | Emplace (ArgsType &&... Args) |
| Constructs a new item at the end of the array, possibly reallocating the whole array to fit. 更多... | |
| template<typename... ArgsType> | |
| FORCEINLINE ElementType & | Emplace_GetRef (ArgsType &&... Args) |
| Constructs a new item at the end of the array, possibly reallocating the whole array to fit. 更多... | |
| template<typename... ArgsType> | |
| FORCEINLINE void | EmplaceAt (SizeType Index, ArgsType &&... Args) |
| Constructs a new item at a specified index, possibly reallocating the whole array to fit. 更多... | |
| template<typename... ArgsType> | |
| FORCEINLINE ElementType & | EmplaceAt_GetRef (SizeType Index, ArgsType &&... Args) |
| Constructs a new item at a specified index, possibly reallocating the whole array to fit. 更多... | |
| void | Empty (SizeType Slack=0) |
| Empties the array. 更多... | |
| template<typename Predicate > | |
| TArray< ElementType > | FilterByPredicate (Predicate Pred) const |
| Filters the elements in the array based on a predicate functor. 更多... | |
| SizeType | Find (const ElementType &Item) const |
| Finds element within the array. 更多... | |
| FORCEINLINE bool | Find (const ElementType &Item, SizeType &Index) const |
| Finds element within the array. 更多... | |
| template<typename KeyType > | |
| ElementType * | FindByKey (const KeyType &Key) |
| Finds an item by key (assuming the ElementType overloads operator== for the comparison). 更多... | |
| template<typename KeyType > | |
| FORCEINLINE const ElementType * | FindByKey (const KeyType &Key) const |
| Finds an item by key (assuming the ElementType overloads operator== for the comparison). 更多... | |
| template<typename Predicate > | |
| ElementType * | FindByPredicate (Predicate Pred) |
| Finds an element which matches a predicate functor. 更多... | |
| template<typename Predicate > | |
| FORCEINLINE const ElementType * | FindByPredicate (Predicate Pred) const |
| Finds an element which matches a predicate functor. 更多... | |
| template<typename SearchType > | |
| bool | FindItemByClass (SearchType **Item=nullptr, SizeType *ItemIndex=nullptr, SizeType StartIndex=0) const |
| Searches for the first entry of the specified type, will only work with TArray<UObject*>. 更多... | |
| SizeType | FindLast (const ElementType &Item) const |
| Finds element within the array starting from the end. 更多... | |
| FORCEINLINE bool | FindLast (const ElementType &Item, SizeType &Index) const |
| Finds element within the array starting from the end. 更多... | |
| template<typename Predicate > | |
| FORCEINLINE SizeType | FindLastByPredicate (Predicate Pred) const |
| Searches the array for the last occurrence of an element which matches the specified predicate. 更多... | |
| template<typename Predicate > | |
| SizeType | FindLastByPredicate (Predicate Pred, SizeType Count) const |
| Searches an initial subrange of the array for the last occurrence of an element which matches the specified predicate. 更多... | |
| FORCEINLINE SIZE_T | GetAllocatedSize (void) const |
| Helper function to return the amount of memory allocated by this container. 更多... | |
| FORCEINLINE ElementType * | GetData () |
| Helper function for returning a typed pointer to the first array entry. 更多... | |
| FORCEINLINE const ElementType * | GetData () const |
| Helper function for returning a typed pointer to the first array entry. 更多... | |
| FORCEINLINE SizeType | GetSlack () const |
| Returns the amount of slack in this array in elements. 更多... | |
| FORCEINLINE uint32 | GetTypeSize () const |
| Helper function returning the size of the inner type. 更多... | |
| void | Heapify () |
| Builds an implicit heap from the array. 更多... | |
| template<class PREDICATE_CLASS > | |
| FORCEINLINE void | Heapify (const PREDICATE_CLASS &Predicate) |
| Implicit heaps 更多... | |
| void | HeapPop (ElementType &OutItem, bool bAllowShrinking=true) |
| Removes the top element from the heap. 更多... | |
| template<class PREDICATE_CLASS > | |
| void | HeapPop (ElementType &OutItem, const PREDICATE_CLASS &Predicate, bool bAllowShrinking=true) |
| Removes the top element from the heap. 更多... | |
| void | HeapPopDiscard (bool bAllowShrinking=true) |
| Removes the top element from the heap. 更多... | |
| template<class PREDICATE_CLASS > | |
| void | HeapPopDiscard (const PREDICATE_CLASS &Predicate, bool bAllowShrinking=true) |
| Removes the top element from the heap. 更多... | |
| SizeType | HeapPush (const ElementType &InItem) |
| Adds a new element to the heap. 更多... | |
| template<class PREDICATE_CLASS > | |
| SizeType | HeapPush (const ElementType &InItem, const PREDICATE_CLASS &Predicate) |
| Adds a new element to the heap. 更多... | |
| SizeType | HeapPush (ElementType &&InItem) |
| Adds a new element to the heap. 更多... | |
| template<class PREDICATE_CLASS > | |
| SizeType | HeapPush (ElementType &&InItem, const PREDICATE_CLASS &Predicate) |
| Adds a new element to the heap. 更多... | |
| void | HeapRemoveAt (SizeType Index, bool bAllowShrinking=true) |
| Removes an element from the heap. 更多... | |
| template<class PREDICATE_CLASS > | |
| void | HeapRemoveAt (SizeType Index, const PREDICATE_CLASS &Predicate, bool bAllowShrinking=true) |
| Removes an element from the heap. 更多... | |
| void | HeapSort () |
| Performs heap sort on the array. 更多... | |
| template<class PREDICATE_CLASS > | |
| void | HeapSort (const PREDICATE_CLASS &Predicate) |
| Performs heap sort on the array. 更多... | |
| ElementType & | HeapTop () |
| Returns the top element from the heap (does not remove the element). 更多... | |
| const ElementType & | HeapTop () const |
| Returns the top element from the heap (does not remove the element). 更多... | |
| template<typename KeyType > | |
| SizeType | IndexOfByKey (const KeyType &Key) const |
| Finds an item by key (assuming the ElementType overloads operator== for the comparison). 更多... | |
| template<typename Predicate > | |
| SizeType | IndexOfByPredicate (Predicate Pred) const |
| Finds an item by predicate. 更多... | |
| void | Init (const ElementType &Element, SizeType Number) |
| Sets the size of the array, filling it with the given element. 更多... | |
| SizeType | Insert (const ElementType &Item, SizeType Index) |
| Inserts a given element into the array at given location. 更多... | |
| SizeType | Insert (const ElementType *Ptr, SizeType Count, SizeType Index) |
| Inserts a raw array of elements at a particular index in the TArray. 更多... | |
| template<typename OtherAllocator > | |
| SizeType | Insert (const TArray< ElementType, OtherAllocator > &Items, const SizeType InIndex) |
| Inserts given elements into the array at given location. 更多... | |
| SizeType | Insert (ElementType &&Item, SizeType Index) |
| Inserts a given element into the array at given location. 更多... | |
| SizeType | Insert (std::initializer_list< ElementType > InitList, const SizeType InIndex) |
| Inserts given elements into the array at given location. 更多... | |
| template<typename OtherAllocator > | |
| SizeType | Insert (TArray< ElementType, OtherAllocator > &&Items, const SizeType InIndex) |
| Inserts given elements into the array at given location. 更多... | |
| ElementType & | Insert_GetRef (const ElementType &Item, SizeType Index) |
| Inserts a given element into the array at given location. 更多... | |
| ElementType & | Insert_GetRef (ElementType &&Item, SizeType Index) |
| Inserts a given element into the array at given location. 更多... | |
| void | InsertDefaulted (SizeType Index, SizeType Count=1) |
| Inserts a given number of default-constructed elements into the array at a given location. 更多... | |
| ElementType & | InsertDefaulted_GetRef (SizeType Index) |
| Inserts a default-constructed element into the array at a given location. 更多... | |
| FORCEINLINE void | InsertUninitialized (SizeType Index, SizeType Count=1) |
| Inserts a given number of uninitialized elements into the array at given location. 更多... | |
| void | InsertZeroed (SizeType Index, SizeType Count=1) |
| Inserts a given number of zeroed elements into the array at given location. 更多... | |
| ElementType & | InsertZeroed_GetRef (SizeType Index) |
| Inserts a zeroed element into the array at given location. 更多... | |
| FORCEINLINE bool | IsValidIndex (SizeType Index) const |
| Tests if index is valid, i.e. 更多... | |
| FORCEINLINE ElementType & | Last (SizeType IndexFromTheEnd=0) |
| Returns n-th last element from the array. 更多... | |
| FORCEINLINE const ElementType & | Last (SizeType IndexFromTheEnd=0) const |
| Returns n-th last element from the array. 更多... | |
| FORCEINLINE SizeType | Max () const |
| Returns maximum number of elements in array. 更多... | |
| FORCEINLINE SizeType | Num () const |
| Returns number of elements in array. 更多... | |
| FORCEINLINE bool | operator!= (const TArray &OtherArray) const |
| Inequality operator. 更多... | |
| TArray & | operator+= (const TArray &Other) |
| Appends the specified array to this array. 更多... | |
| TArray & | operator+= (std::initializer_list< ElementType > InitList) |
| Appends the specified initializer list to this array. 更多... | |
| TArray & | operator+= (TArray &&Other) |
| Appends the specified array to this array. 更多... | |
| TArray & | operator= (const TArray &Other) |
| Assignment operator. 更多... | |
| template<typename OtherAllocator > | |
| TArray & | operator= (const TArray< ElementType, OtherAllocator > &Other) |
| Assignment operator. 更多... | |
| TArray & | operator= (std::initializer_list< InElementType > InitList) |
| Initializer list assignment operator. 更多... | |
| TArray & | operator= (TArray &&Other) |
| Move assignment operator. 更多... | |
| bool | operator== (const TArray &OtherArray) const |
| Equality operator. 更多... | |
| FORCEINLINE ElementType & | operator[] (SizeType Index) |
| Array bracket operator. 更多... | |
| FORCEINLINE const ElementType & | operator[] (SizeType Index) const |
| Array bracket operator. 更多... | |
| FORCEINLINE ElementType | Pop (bool bAllowShrinking=true) |
| Pops element from the array. 更多... | |
| FORCEINLINE void | Push (const ElementType &Item) |
| Pushes element into the array. 更多... | |
| FORCEINLINE void | Push (ElementType &&Item) |
| Pushes element into the array. 更多... | |
| FORCEINLINE void | RangeCheck (SizeType Index) const |
| Checks if index is in array range. 更多... | |
| SizeType | Remove (const ElementType &Item) |
| Removes as many instances of Item as there are in the array, maintaining order but not indices. 更多... | |
| template<class PREDICATE_CLASS > | |
| SizeType | RemoveAll (const PREDICATE_CLASS &Predicate) |
| Remove all instances that match the predicate, maintaining order but not indices Optimized to work with runs of matches/non-matches 更多... | |
| template<class PREDICATE_CLASS > | |
| SizeType | RemoveAllSwap (const PREDICATE_CLASS &Predicate, bool bAllowShrinking=true) |
| Remove all instances that match the predicate 更多... | |
| FORCEINLINE void | RemoveAt (SizeType Index) |
| Removes an element (or elements) at given location optionally shrinking the array. 更多... | |
| template<typename CountType > | |
| FORCEINLINE void | RemoveAt (SizeType Index, CountType Count, bool bAllowShrinking=true) |
| Removes an element (or elements) at given location optionally shrinking the array. 更多... | |
| FORCEINLINE void | RemoveAtSwap (SizeType Index) |
| Removes an element (or elements) at given location optionally shrinking the array. 更多... | |
| template<typename CountType > | |
| FORCEINLINE void | RemoveAtSwap (SizeType Index, CountType Count, bool bAllowShrinking=true) |
| Removes an element (or elements) at given location optionally shrinking the array. 更多... | |
| SizeType | RemoveSingle (const ElementType &Item) |
| Removes the first occurrence of the specified item in the array, maintaining order but not indices. 更多... | |
| SizeType | RemoveSingleSwap (const ElementType &Item, bool bAllowShrinking=true) |
| Removes the first occurrence of the specified item in the array. 更多... | |
| SizeType | RemoveSwap (const ElementType &Item, bool bAllowShrinking=true) |
| Removes item from the array. 更多... | |
| FORCEINLINE void | Reserve (SizeType Number) |
| Reserves memory such that the array can contain at least Number elements. 更多... | |
| void | Reset (SizeType NewSize=0) |
| Same as empty, but doesn't change memory allocations, unless the new size is larger than the current array. 更多... | |
| void | SetNum (SizeType NewNum, bool bAllowShrinking=true) |
| Resizes array to given number of elements. 更多... | |
| void | SetNumUninitialized (SizeType NewNum, bool bAllowShrinking=true) |
| Resizes array to given number of elements. 更多... | |
| void | SetNumUnsafeInternal (SizeType NewNum) |
| Does nothing except setting the new number of elements in the array. 更多... | |
| void | SetNumZeroed (SizeType NewNum, bool bAllowShrinking=true) |
| Resizes array to given number of elements. 更多... | |
| FORCEINLINE void | Shrink () |
| Shrinks the array's used memory to smallest possible to store elements currently in it. 更多... | |
| void | Sort () |
| Sorts the array assuming < operator is defined for the item type. 更多... | |
| template<class PREDICATE_CLASS > | |
| void | Sort (const PREDICATE_CLASS &Predicate) |
| Sorts the array using user define predicate class. 更多... | |
| void | StableSort () |
| Stable sorts the array assuming < operator is defined for the item type. 更多... | |
| template<class PREDICATE_CLASS > | |
| void | StableSort (const PREDICATE_CLASS &Predicate) |
| Stable sorts the array using user defined predicate class. 更多... | |
| FORCEINLINE void | Swap (SizeType FirstIndexToSwap, SizeType SecondIndexToSwap) |
| Element-wise array element swap. 更多... | |
| FORCEINLINE void | SwapMemory (SizeType FirstIndexToSwap, SizeType SecondIndexToSwap) |
| Element-wise array memory swap. 更多... | |
| FORCEINLINE | TArray () |
| Constructor, initializes element number counters. | |
| FORCEINLINE | TArray (const ElementType *Ptr, SizeType Count) |
| Constructor from a raw array of elements. 更多... | |
| FORCEINLINE | TArray (const TArray &Other) |
| Copy constructor. 更多... | |
| FORCEINLINE | TArray (const TArray &Other, SizeType ExtraSlack) |
| Copy constructor. 更多... | |
| template<typename OtherElementType , typename OtherAllocator > | |
| FORCEINLINE | TArray (const TArray< OtherElementType, OtherAllocator > &Other) |
| Copy constructor with changed allocator. 更多... | |
| TArray (std::initializer_list< InElementType > InitList) | |
| Initializer list constructor | |
| FORCEINLINE | TArray (TArray &&Other) |
| Move constructor. 更多... | |
| template<typename OtherElementType > | |
| TArray (TArray< OtherElementType, Allocator > &&Other, SizeType ExtraSlack) | |
| Move constructor. 更多... | |
| template<typename OtherElementType , typename OtherAllocator > | |
| FORCEINLINE | TArray (TArray< OtherElementType, OtherAllocator > &&Other) |
| Move constructor. 更多... | |
| FORCEINLINE ElementType & | Top () |
| Returns the top element, i.e. 更多... | |
| FORCEINLINE const ElementType & | Top () const |
| Returns the top element, i.e. 更多... | |
| template<class PREDICATE_CLASS > | |
| void | VerifyHeap (const PREDICATE_CLASS &Predicate) |
| Verifies the heap. 更多... | |
| ~TArray () | |
| Destructor. | |
TInlineComponentArray is simply a TArray that reserves a fixed amount of space on the stack to try to avoid heap allocation when there are fewer than a specified number of elements expected in the result.