|
| bool | OrderIndependentCompareEqual (const TMAPBASE &Other) const |
| |
| UE_FORCEINLINE_HINT void | Empty (int32 ExpectedNumElements=0) |
| |
| UE_FORCEINLINE_HINT void | Reset () |
| |
| UE_FORCEINLINE_HINT void | Shrink () |
| |
| UE_FORCEINLINE_HINT void | Compact () |
| |
| UE_FORCEINLINE_HINT void | CompactStable () |
| |
| UE_FORCEINLINE_HINT void | Reserve (int32 Number) |
| |
| bool | IsEmpty () const |
| |
| UE_FORCEINLINE_HINT int32 | Num () const |
| |
| UE_FORCEINLINE_HINT int32 | Max () const |
| |
| UE_FORCEINLINE_HINT int32 | GetMaxIndex () const |
| |
| UE_FORCEINLINE_HINT bool | IsValidId (FSetElementId Id) const |
| |
| UE_FORCEINLINE_HINT ElementType & | Get (FSetElementId Id) |
| |
| UE_FORCEINLINE_HINT const ElementType & | Get (FSetElementId Id) const |
| |
| template<typename Allocator > |
| int32 | GetKeys (TArray< KeyType, Allocator > &OutKeys) const |
| |
| template<typename InSetKeyFuncs , typename InSetAllocator > |
| int32 | GetKeys (TSet< KeyType, InSetKeyFuncs, InSetAllocator > &OutKeys) const |
| |
| UE_FORCEINLINE_HINT SIZE_T | GetAllocatedSize () const |
| |
| UE_FORCEINLINE_HINT void | CountBytes (FArchive &Ar) const |
| |
| UE_FORCEINLINE_HINT ValueType & | Add (const KeyType &InKey, const ValueType &InValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | Add (const KeyType &InKey, ValueType &&InValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | Add (KeyType &&InKey, const ValueType &InValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | Add (KeyType &&InKey, ValueType &&InValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | AddByHash (uint32 KeyHash, const KeyType &InKey, const ValueType &InValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | AddByHash (uint32 KeyHash, const KeyType &InKey, ValueType &&InValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | AddByHash (uint32 KeyHash, KeyType &&InKey, const ValueType &InValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | AddByHash (uint32 KeyHash, KeyType &&InKey, ValueType &&InValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | Add (const KeyType &InKey) |
| |
| UE_FORCEINLINE_HINT ValueType & | Add (KeyType &&InKey) |
| |
| UE_FORCEINLINE_HINT ValueType & | AddByHash (uint32 KeyHash, const KeyType &InKey) |
| |
| UE_FORCEINLINE_HINT ValueType & | AddByHash (uint32 KeyHash, KeyType &&InKey) |
| |
| UE_FORCEINLINE_HINT ValueType & | Add (const TTuple< KeyType, ValueType > &InKeyValue) |
| |
| UE_FORCEINLINE_HINT ValueType & | Add (TTuple< KeyType, ValueType > &&InKeyValue) |
| |
| template<typename InitKeyType = KeyType, typename InitValueType = ValueType> |
| ValueType & | Emplace (InitKeyType &&InKey, InitValueType &&InValue) |
| |
| template<typename InitKeyType = KeyType, typename InitValueType = ValueType> |
| ValueType & | EmplaceByHash (uint32 KeyHash, InitKeyType &&InKey, InitValueType &&InValue) |
| |
| template<typename InitKeyType = KeyType> |
| ValueType & | Emplace (InitKeyType &&InKey) |
| |
| template<typename InitKeyType = KeyType> |
| ValueType & | EmplaceByHash (uint32 KeyHash, InitKeyType &&InKey) |
| |
| int32 | Remove (KeyConstPointerType InKey) |
| |
| int32 | RemoveStable (KeyConstPointerType InKey) |
| |
| template<typename ComparableKey > |
| int32 | RemoveByHash (uint32 KeyHash, const ComparableKey &Key) |
| |
| UE_FORCEINLINE_HINT void | Remove (FSetElementId Id) |
| |
| const KeyType * | FindKey (ValueInitType Value) const |
| |
| template<typename Predicate > |
| TMAP< KeyType, ValueType, SetAllocator, KeyFuncs > | FilterByPredicate (Predicate Pred) const |
| |
| ValueType * | Find (KeyConstPointerType Key) |
| |
| UE_FORCEINLINE_HINT const ValueType * | Find (KeyConstPointerType Key) const |
| |
| template<typename ComparableKey > |
| ValueType * | FindByHash (uint32 KeyHash, const ComparableKey &Key) |
| |
| template<typename ComparableKey > |
| UE_FORCEINLINE_HINT const ValueType * | FindByHash (uint32 KeyHash, const ComparableKey &Key) const |
| |
| template<typename ComparableKey > |
| ValueType & | FindByHashChecked (uint32 KeyHash, const ComparableKey &Key) |
| |
| template<typename ComparableKey > |
| UE_FORCEINLINE_HINT const ValueType & | FindByHashChecked (uint32 KeyHash, const ComparableKey &Key) const |
| |
| UE_FORCEINLINE_HINT FSetElementId | FindId (KeyInitType Key) const |
| |
| template<typename ComparableKey > |
| UE_FORCEINLINE_HINT FSetElementId | FindIdByHash (uint32 KeyHash, const ComparableKey &Key) const |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAdd (const KeyType &Key) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAdd (KeyType &&Key) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAddByHash (uint32 KeyHash, const KeyType &Key) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAddByHash (uint32 KeyHash, KeyType &&Key) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAdd (const KeyType &Key, const ValueType &Value) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAdd (const KeyType &Key, ValueType &&Value) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAdd (KeyType &&Key, const ValueType &Value) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAdd (KeyType &&Key, ValueType &&Value) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAddByHash (uint32 KeyHash, const KeyType &Key, const ValueType &Value) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAddByHash (uint32 KeyHash, const KeyType &Key, ValueType &&Value) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAddByHash (uint32 KeyHash, KeyType &&Key, const ValueType &Value) |
| |
| UE_FORCEINLINE_HINT ValueType & | FindOrAddByHash (uint32 KeyHash, KeyType &&Key, ValueType &&Value) |
| |
| const ValueType & | FindChecked (KeyConstPointerType Key) const |
| |
| ValueType & | FindChecked (KeyConstPointerType Key) |
| |
| ValueType | FindRef (KeyConstPointerType Key) const |
| |
| ValueType | FindRef (KeyConstPointerType Key, ValueType DefaultValue) const |
| |
| ElementType * | FindArbitraryElement () |
| |
| const ElementType * | FindArbitraryElement () const |
| |
| UE_FORCEINLINE_HINT bool | Contains (KeyConstPointerType Key) const |
| |
| template<typename ComparableKey > |
| UE_FORCEINLINE_HINT bool | ContainsByHash (uint32 KeyHash, const ComparableKey &Key) const |
| |
| TArray< ElementType > | Array () const |
| |
| template<typename Allocator > |
| void | GenerateKeyArray (TArray< KeyType, Allocator > &OutArray) const |
| |
| template<typename Allocator > |
| void | GenerateValueArray (TArray< ValueType, Allocator > &OutArray) const |
| |
| void | Dump (FOutputDevice &Ar) |
| |
| void | WriteMemoryImage (FMemoryImageWriter &Writer) const |
| |
| void | CopyUnfrozen (const FMemoryUnfreezeContent &Context, void *Dst) const |
| |
| UE_FORCEINLINE_HINT TIterator | CreateIterator () |
| |
| UE_FORCEINLINE_HINT TConstIterator | CreateConstIterator () const |
| |
| UE_FORCEINLINE_HINT TKeyIterator | CreateKeyIterator (typename TKeyIterator::KeyArgumentType InKey) |
| |
| UE_FORCEINLINE_HINT TConstKeyIterator | CreateConstKeyIterator (typename TConstKeyIterator::KeyArgumentType InKey) const |
| |
| UE_FORCEINLINE_HINT TRangedForIterator | begin () |
| |
| UE_FORCEINLINE_HINT TRangedForConstIterator | begin () const |
| |
| UE_FORCEINLINE_HINT TRangedForIterator | end () |
| |
| UE_FORCEINLINE_HINT TRangedForConstIterator | end () const |
| |
The base class of maps from keys to values. Implemented using a TSet of key-value pairs with a custom KeyFuncs, with the same O(1) addition, removal, and finding.
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.