|
FORCEINLINE | TSet () |
|
FORCEINLINE | TSet (const TSet &Copy) |
|
FORCEINLINE | TSet (const TArray< ElementType > &InArray) |
|
FORCEINLINE | TSet (TArray< ElementType > &&InArray) |
|
FORCEINLINE | ~TSet () |
|
TSet & | operator= (const TSet &Copy) |
|
| TSet (std::initializer_list< ElementType > InitList) |
|
| TSet (TSet &&Other) |
|
TSet & | operator= (TSet &&Other) |
|
template<typename OtherAllocator > |
| TSet (TSet< ElementType, KeyFuncs, OtherAllocator > &&Other) |
|
template<typename OtherAllocator > |
| TSet (const TSet< ElementType, KeyFuncs, OtherAllocator > &Other) |
|
template<typename OtherAllocator > |
TSet & | operator= (TSet< ElementType, KeyFuncs, OtherAllocator > &&Other) |
|
template<typename OtherAllocator > |
TSet & | operator= (const TSet< ElementType, KeyFuncs, OtherAllocator > &Other) |
|
TSet & | operator= (std::initializer_list< ElementType > InitList) |
|
void | Empty (int32 ExpectedNumElements=0) |
|
void | Reset () |
|
FORCEINLINE void | Shrink () |
|
FORCEINLINE void | Compact () |
|
FORCEINLINE void | CompactStable () |
|
FORCEINLINE void | Reserve (int32 Number) |
|
FORCEINLINE void | Relax () |
|
FORCEINLINE SIZE_T | GetAllocatedSize (void) const |
|
FORCEINLINE void | CountBytes (FArchive &Ar) const |
|
bool | IsEmpty () const |
|
FORCEINLINE int32 | Num () const |
|
FORCEINLINE int32 | GetMaxIndex () const |
|
FORCEINLINE bool | IsValidId (FSetElementId Id) const |
|
FORCEINLINE ElementType & | operator[] (FSetElementId Id) |
|
FORCEINLINE const ElementType & | operator[] (FSetElementId Id) const |
|
FORCEINLINE FSetElementId | Add (const InElementType &InElement, bool *bIsAlreadyInSetPtr=nullptr) |
|
FORCEINLINE FSetElementId | Add (InElementType &&InElement, bool *bIsAlreadyInSetPtr=nullptr) |
|
FORCEINLINE ElementType & | FindOrAdd (const InElementType &InElement, bool *bIsAlreadyInSetPtr=nullptr) |
|
FORCEINLINE ElementType & | FindOrAdd (InElementType &&InElement, bool *bIsAlreadyInSetPtr=nullptr) |
|
FORCEINLINE FSetElementId | AddByHash (uint32 KeyHash, const InElementType &InElement, bool *bIsAlreadyInSetPtr=nullptr) |
|
FORCEINLINE FSetElementId | AddByHash (uint32 KeyHash, InElementType &&InElement, bool *bIsAlreadyInSetPtr=nullptr) |
|
template<typename ElementReferenceType > |
ElementType & | FindOrAddByHash (uint32 KeyHash, ElementReferenceType &&InElement, bool *bIsAlreadyInSetPtr=nullptr) |
|
template<typename ArgsType = ElementType> |
FSetElementId | Emplace (ArgsType &&Args, bool *bIsAlreadyInSetPtr=nullptr) |
|
template<typename ArgsType = ElementType> |
FSetElementId | EmplaceByHash (uint32 KeyHash, ArgsType &&Args, bool *bIsAlreadyInSetPtr=nullptr) |
|
template<typename ViewSizeType > |
void | Append (TArrayView< ElementType, ViewSizeType > InElements) |
|
template<typename ViewSizeType > |
void | Append (TArrayView< const ElementType, ViewSizeType > InElements) |
|
template<typename ArrayAllocator > |
void | Append (const TArray< ElementType, ArrayAllocator > &InElements) |
|
template<typename ArrayAllocator > |
void | Append (TArray< ElementType, ArrayAllocator > &&InElements) |
|
template<typename OtherAllocator > |
void | Append (const TSet< ElementType, KeyFuncs, OtherAllocator > &OtherSet) |
|
template<typename OtherAllocator > |
void | Append (TSet< ElementType, KeyFuncs, OtherAllocator > &&OtherSet) |
|
void | Append (std::initializer_list< ElementType > InitList) |
|
void | Remove (FSetElementId ElementId) |
|
FSetElementId | FindId (KeyInitType Key) const |
|
template<typename ComparableKey > |
FSetElementId | FindIdByHash (uint32 KeyHash, const ComparableKey &Key) const |
|
FORCEINLINE ElementType * | Find (KeyInitType Key) |
|
FORCEINLINE const ElementType * | Find (KeyInitType Key) const |
|
template<typename ComparableKey > |
ElementType * | FindByHash (uint32 KeyHash, const ComparableKey &Key) |
|
template<typename ComparableKey > |
const ElementType * | FindByHash (uint32 KeyHash, const ComparableKey &Key) const |
|
int32 | Remove (KeyInitType Key) |
|
template<typename ComparableKey > |
int32 | RemoveByHash (uint32 KeyHash, const ComparableKey &Key) |
|
FORCEINLINE bool | Contains (KeyInitType Key) const |
|
template<typename ComparableKey > |
FORCEINLINE bool | ContainsByHash (uint32 KeyHash, const ComparableKey &Key) const |
|
template<typename PREDICATE_CLASS > |
void | Sort (const PREDICATE_CLASS &Predicate) |
|
template<typename PREDICATE_CLASS > |
void | StableSort (const PREDICATE_CLASS &Predicate) |
|
void | SortFreeList () |
|
void | Dump (FOutputDevice &Ar) |
|
bool | VerifyHashElementsKey (KeyInitType Key) |
|
void | DumpHashElements (FOutputDevice &Ar) |
|
TSet | Intersect (const TSet &OtherSet) const |
|
TSet | Union (const TSet &OtherSet) const |
|
TSet | Difference (const TSet &OtherSet) const |
|
bool | Includes (const TSet< ElementType, KeyFuncs, Allocator > &OtherSet) const |
|
TArray< ElementType > | Array () const |
|
FORCEINLINE void | CheckAddress (const ElementType *Addr) const |
|
template<typename OtherKeyFuncs , typename AliasElementType = ElementType, typename std::enable_if_t< TIsContainerElementTypeCopyable< AliasElementType >::Value > * = nullptr> |
TSet & | operator= (TSet< typename TContainerElementTypeCompatibility< ElementType >::CopyFromOtherType, OtherKeyFuncs, Allocator > &&Other) |
|
template<typename OtherKeyFuncs , typename OtherAllocator , typename AliasElementType = ElementType, typename std::enable_if_t< TIsContainerElementTypeCopyable< AliasElementType >::Value > * = nullptr> |
TSet & | operator= (const TSet< typename TContainerElementTypeCompatibility< ElementType >::CopyFromOtherType, OtherKeyFuncs, OtherAllocator > &Other) |
|
template<typename OtherKeyFuncs , typename OtherAllocator , typename AliasElementType = ElementType, typename std::enable_if_t< TIsContainerElementTypeCopyable< AliasElementType >::Value > * = nullptr> |
void | Append (const TSet< typename TContainerElementTypeCompatibility< ElementType >::CopyFromOtherType, OtherKeyFuncs, OtherAllocator > &OtherSet) |
|
template<typename OtherKeyFuncs , typename AliasElementType = ElementType, typename std::enable_if_t< TIsContainerElementTypeCopyable< AliasElementType >::Value > * = nullptr> |
void | Append (TSet< typename TContainerElementTypeCompatibility< ElementType >::CopyFromOtherType, OtherKeyFuncs, Allocator > &&OtherSet) |
|
void | WriteMemoryImage (FMemoryImageWriter &Writer) const |
|
void | CopyUnfrozen (const FMemoryUnfreezeContent &Context, void *Dst) const |
|
FORCEINLINE TIterator | CreateIterator () |
|
FORCEINLINE TConstIterator | CreateConstIterator () const |
|
FORCEINLINE TRangedForIterator | begin () |
|
FORCEINLINE TRangedForConstIterator | begin () const |
|
FORCEINLINE TRangedForIterator | end () |
|
FORCEINLINE TRangedForConstIterator | end () const |
|
A set with an optional KeyFuncs parameters for customizing how the elements are compared and searched.
E.g. You can specify a mapping from elements to keys if you want to find elements by specifying a subset of the element type. It uses a TSparseArray of the elements, and also links the elements into a hash with a number of buckets proportional to the number of elements. Addition, removal, and finding are O(1).
The ByHash() functions are somewhat dangerous but particularly useful in two scenarios: – Heterogeneous lookup to avoid creating expensive keys like FString when looking up by const TCHAR*. You must ensure the hash is calculated in the same way as ElementType is hashed. If possible put both ComparableKey and ElementType hash functions next to each other in the same header to avoid bugs when the ElementType hash function is changed. – Reducing contention around hash tables protected by a lock. It is often important to incur the cache misses of reading key data and doing the hashing before acquiring the lock.
Definition at line 281 of file Set.h.