#include <Map.h>
Inherited by TSortableMapBase< FString, FConfigSection, SetAllocator, KeyFuncs >, TSortableMapBase< int32, FString, SetAllocator, KeyFuncs >, TSortableMapBase< FString, TSharedPtr< TTypeContainer::IInstanceProvider >, SetAllocator, KeyFuncs >, TSortableMapBase< InKeyType, InValueType, SetAllocator, KeyFuncs >, TSortableMapBase< FString, TSharedRef< FAutomationSpecBase::FSpec >, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FAutomationTestBase *, SetAllocator, KeyFuncs >, TSortableMapBase< FString, const FColor *, SetAllocator, KeyFuncs >, TSortableMapBase< FName, struct ICompressionFormat *, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FConfigFile *, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FConfigContext::FPerPlatformDirs, SetAllocator, KeyFuncs >, TSortableMapBase< FString, TMap< FName, FString >, SetAllocator, KeyFuncs >, TSortableMapBase< FName, FString, SetAllocator, KeyFuncs >, TSortableMapBase< FString, IConsoleObject *, SetAllocator, KeyFuncs >, TSortableMapBase< FString, TArray< FString >, SetAllocator, KeyFuncs >, TSortableMapBase< FString, TArray< uint8 >, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FString, SetAllocator, KeyFuncs >, TSortableMapBase< FName, FEmbeddedCommunicationParamsDelegate, SetAllocator, KeyFuncs >, TSortableMapBase< FString, void *, SetAllocator, KeyFuncs >, TSortableMapBase< FGuid, FGuid, SetAllocator, KeyFuncs >, TSortableMapBase< FGuid, FOpParameters, SetAllocator, KeyFuncs >, TSortableMapBase< FString, SIZE_T, SetAllocator, KeyFuncs >, TSortableMapBase< FGuid, FNamedAESKey, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FDateTime, SetAllocator, KeyFuncs >, TSortableMapBase< FString, int32, SetAllocator, KeyFuncs >, TSortableMapBase< FMallocCallstackHandler::FCallStackMapKey, int32, SetAllocator, KeyFuncs >, TSortableMapBase< const void *const, FMallocDoubleFreeFinder::TrackedAllocationData, SetAllocator, KeyFuncs >, TSortableMapBase< void *, int32, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FManagedStorageFileLockRegistry::FLockData, SetAllocator, KeyFuncs >, TSortableMapBase< FName, TArray< FName >, SetAllocator, KeyFuncs >, TSortableMapBase< FIoChunkId, FIoHash, SetAllocator, KeyFuncs >, TSortableMapBase< FString, TArray< FName >, SetAllocator, KeyFuncs >, TSortableMapBase< FString, int64, SetAllocator, KeyFuncs >, TSortableMapBase< FString, TSharedPtr< FPreloadableFile >, SetAllocator, KeyFuncs >, TSortableMapBase< IQueuedWork *, FQueuedThreadPoolWrapper::FScheduledWork *, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FRemoteConfigAsyncIOInfo, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FAsyncTask< FRemoteConfigAsyncWorker > *, SetAllocator, KeyFuncs >, TSortableMapBase< FString, uint8 *, SetAllocator, KeyFuncs >, TSortableMapBase< FString, FTokenFunctionHandler, SetAllocator, KeyFuncs >, TSortableMapBase< FOperatorFunctionID, FUnaryFunction, SetAllocator, KeyFuncs >, TSortableMapBase< FOperatorFunctionID, FBinaryFunction, SetAllocator, KeyFuncs >, TSortableMapBase< FOperatorFunctionID, FShortCircuit, SetAllocator, KeyFuncs >, TSortableMapBase< FTextId, FDisplayStringEntry, SetAllocator, KeyFuncs >, TSortableMapBase< FTextId, uint16, SetAllocator, KeyFuncs >, TSortableMapBase< uint32, FThreadHeartBeat::FHeartBeatInfo, SetAllocator, KeyFuncs >, TSortableMapBase< FName, FThreadHeartBeat::FHeartBeatInfo, SetAllocator, KeyFuncs >, TSortableMapBase< uint32, FRunnableThread *, TInlineSetAllocator< 256 >, KeyFuncs >, TSortableMapBase< FName, TArray< FString >, SetAllocator, KeyFuncs >, TSortableMapBase< int32, TGenericGrowableAllocator::AllocationInfo, SetAllocator, KeyFuncs >, TSortableMapBase< uint64, uint32, SetAllocator, KeyFuncs >, TSortableMapBase< const FString, const TArray< FString >, SetAllocator, KeyFuncs >, and TSortableMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >.
|
bool | OrderIndependentCompareEqual (const TMapBase &Other) const |
|
FORCEINLINE void | Empty (int32 ExpectedNumElements=0) |
|
FORCEINLINE void | Reset () |
|
FORCEINLINE void | Shrink () |
|
FORCEINLINE void | Compact () |
|
FORCEINLINE void | CompactStable () |
|
FORCEINLINE void | Reserve (int32 Number) |
|
bool | IsEmpty () const |
|
FORCEINLINE int32 | Num () const |
|
template<typename Allocator > |
int32 | GetKeys (TArray< KeyType, Allocator > &OutKeys) const |
|
template<typename Allocator > |
int32 | GetKeys (TSet< KeyType, Allocator > &OutKeys) const |
|
FORCEINLINE SIZE_T | GetAllocatedSize () const |
|
FORCEINLINE void | CountBytes (FArchive &Ar) const |
|
FORCEINLINE ValueType & | Add (const KeyType &InKey, const ValueType &InValue) |
|
FORCEINLINE ValueType & | Add (const KeyType &InKey, ValueType &&InValue) |
|
FORCEINLINE ValueType & | Add (KeyType &&InKey, const ValueType &InValue) |
|
FORCEINLINE ValueType & | Add (KeyType &&InKey, ValueType &&InValue) |
|
FORCEINLINE ValueType & | AddByHash (uint32 KeyHash, const KeyType &InKey, const ValueType &InValue) |
|
FORCEINLINE ValueType & | AddByHash (uint32 KeyHash, const KeyType &InKey, ValueType &&InValue) |
|
FORCEINLINE ValueType & | AddByHash (uint32 KeyHash, KeyType &&InKey, const ValueType &InValue) |
|
FORCEINLINE ValueType & | AddByHash (uint32 KeyHash, KeyType &&InKey, ValueType &&InValue) |
|
FORCEINLINE ValueType & | Add (const KeyType &InKey) |
|
FORCEINLINE ValueType & | Add (KeyType &&InKey) |
|
FORCEINLINE ValueType & | AddByHash (uint32 KeyHash, const KeyType &InKey) |
|
FORCEINLINE ValueType & | AddByHash (uint32 KeyHash, KeyType &&InKey) |
|
FORCEINLINE ValueType & | Add (const TTuple< KeyType, ValueType > &InKeyValue) |
|
FORCEINLINE 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) |
|
FORCEINLINE int32 | Remove (KeyConstPointerType InKey) |
|
template<typename ComparableKey > |
FORCEINLINE int32 | RemoveByHash (uint32 KeyHash, const ComparableKey &Key) |
|
const KeyType * | FindKey (ValueInitType Value) const |
|
template<typename Predicate > |
TMap< KeyType, ValueType > | FilterByPredicate (Predicate Pred) const |
|
FORCEINLINE ValueType * | Find (KeyConstPointerType Key) |
|
FORCEINLINE const ValueType * | Find (KeyConstPointerType Key) const |
|
template<typename ComparableKey > |
FORCEINLINE ValueType * | FindByHash (uint32 KeyHash, const ComparableKey &Key) |
|
template<typename ComparableKey > |
FORCEINLINE const ValueType * | FindByHash (uint32 KeyHash, const ComparableKey &Key) const |
|
FORCEINLINE ValueType & | FindOrAdd (const KeyType &Key) |
|
FORCEINLINE ValueType & | FindOrAdd (KeyType &&Key) |
|
FORCEINLINE ValueType & | FindOrAddByHash (uint32 KeyHash, const KeyType &Key) |
|
FORCEINLINE ValueType & | FindOrAddByHash (uint32 KeyHash, KeyType &&Key) |
|
FORCEINLINE ValueType & | FindOrAdd (const KeyType &Key, const ValueType &Value) |
|
FORCEINLINE ValueType & | FindOrAdd (const KeyType &Key, ValueType &&Value) |
|
FORCEINLINE ValueType & | FindOrAdd (KeyType &&Key, const ValueType &Value) |
|
FORCEINLINE ValueType & | FindOrAdd (KeyType &&Key, ValueType &&Value) |
|
FORCEINLINE ValueType & | FindOrAddByHash (uint32 KeyHash, const KeyType &Key, const ValueType &Value) |
|
FORCEINLINE ValueType & | FindOrAddByHash (uint32 KeyHash, const KeyType &Key, ValueType &&Value) |
|
FORCEINLINE ValueType & | FindOrAddByHash (uint32 KeyHash, KeyType &&Key, const ValueType &Value) |
|
FORCEINLINE ValueType & | FindOrAddByHash (uint32 KeyHash, KeyType &&Key, ValueType &&Value) |
|
FORCEINLINE const ValueType & | FindChecked (KeyConstPointerType Key) const |
|
FORCEINLINE ValueType & | FindChecked (KeyConstPointerType Key) |
|
FORCEINLINE ValueType | FindRef (KeyConstPointerType Key) const |
|
FORCEINLINE bool | Contains (KeyConstPointerType Key) const |
|
template<typename ComparableKey > |
FORCEINLINE 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 |
|
FORCEINLINE TIterator | CreateIterator () |
|
FORCEINLINE TConstIterator | CreateConstIterator () const |
|
FORCEINLINE TKeyIterator | CreateKeyIterator (typename TKeyIterator::KeyArgumentType InKey) |
|
FORCEINLINE TConstKeyIterator | CreateConstKeyIterator (typename TConstKeyIterator::KeyArgumentType InKey) const |
|
FORCEINLINE TRangedForIterator | begin () |
|
FORCEINLINE TRangedForConstIterator | begin () const |
|
FORCEINLINE TRangedForIterator | end () |
|
FORCEINLINE TRangedForConstIterator | end () const |
|
|
| TMapBase ()=default |
|
| TMapBase (TMapBase &&)=default |
|
| TMapBase (const TMapBase &)=default |
|
TMapBase & | operator= (TMapBase &&)=default |
|
TMapBase & | operator= (const TMapBase &)=default |
|
template<typename OtherSetAllocator > |
| TMapBase (TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other) |
|
template<typename OtherSetAllocator > |
| TMapBase (const TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other) |
|
template<typename OtherSetAllocator > |
TMapBase & | operator= (TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other) |
|
template<typename OtherSetAllocator > |
TMapBase & | operator= (const TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other) |
|
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.
Definition at line 133 of file Map.h.
◆ ElementSetType
◆ ElementType
◆ KeyConstPointerType
◆ KeyInitType
◆ TRangedForConstIterator
◆ TRangedForIterator
◆ ValueInitType
◆ TMapBase() [1/5]
◆ TMapBase() [2/5]
◆ TMapBase() [3/5]
◆ TMapBase() [4/5]
Constructor for moving elements from a TMap with a different SetAllocator
Definition at line 153 of file Map.h.
◆ TMapBase() [5/5]
Constructor for copying elements from a TMap with a different SetAllocator
Definition at line 159 of file Map.h.
◆ Add() [1/8]
Set a default value associated with a key.
- Parameters
-
InKey | The key to associate the value with. |
- Returns
- A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map.
Definition at line 379 of file Map.h.
◆ Add() [2/8]
Set the value associated with a key.
- Parameters
-
InKey | The key to associate the value with. |
InValue | The value to associate with the key. |
- Returns
- A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map.
Definition at line 362 of file Map.h.
◆ Add() [3/8]
◆ Add() [4/8]
Set the value associated with a key.
- Parameters
-
InKeyValue | A Tuple containing the Key and Value to associate together |
- Returns
- A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map.
Definition at line 392 of file Map.h.
◆ Add() [5/8]
◆ Add() [6/8]
◆ Add() [7/8]
◆ Add() [8/8]
◆ AddByHash() [1/6]
See Add() and class documentation section on ByHash() functions
Definition at line 383 of file Map.h.
◆ AddByHash() [2/6]
See Add() and class documentation section on ByHash() functions
Definition at line 368 of file Map.h.
◆ AddByHash() [3/6]
◆ AddByHash() [4/6]
◆ AddByHash() [5/6]
◆ AddByHash() [6/6]
◆ AppendHash()
◆ Array()
Copy the key/value pairs in this map into an array.
Definition at line 682 of file Map.h.
◆ begin() [1/2]
DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support.
Definition at line 957 of file Map.h.
◆ begin() [2/2]
◆ Compact()
Compacts the pair set to remove holes
Definition at line 241 of file Map.h.
◆ CompactStable()
Compacts the pair set to remove holes. Does not change the iteration order of the elements.
Definition at line 247 of file Map.h.
◆ Contains()
Check if map contains the specified key.
- Parameters
-
- Returns
- true if the map contains the key.
Definition at line 669 of file Map.h.
◆ ContainsByHash()
See Contains() and class documentation section on ByHash() functions
Definition at line 676 of file Map.h.
◆ CopyUnfrozen()
◆ CountBytes()
Track the container's memory use through an archive.
- Parameters
-
- See also
- GetAllocatedSize
Definition at line 350 of file Map.h.
◆ CreateConstIterator()
Creates a const iterator over all the pairs in this map
Definition at line 933 of file Map.h.
◆ CreateConstKeyIterator()
Creates a const iterator over the values associated with a specified key in a map
Definition at line 945 of file Map.h.
◆ CreateIterator()
Creates an iterator over all the pairs in this map
Definition at line 927 of file Map.h.
◆ CreateKeyIterator()
Creates an iterator over the values associated with a specified key in a map
Definition at line 939 of file Map.h.
◆ Dump()
Describes the map's contents through an output device.
- Parameters
-
Ar | The output device to describe the map's contents through. |
Definition at line 720 of file Map.h.
◆ Emplace() [1/2]
Set a default value associated with a key.
- Parameters
-
InKey | The key to associate the value with. |
- Returns
- A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map.
Definition at line 425 of file Map.h.
◆ Emplace() [2/2]
Sets the value associated with a key.
- Parameters
-
InKey | The key to associate the value with. |
InValue | The value to associate with the key. |
- Returns
- A reference to the value as stored in the map. The reference is only valid until the next change to any key in the map.
Definition at line 402 of file Map.h.
◆ EmplaceByHash() [1/2]
See Emplace() and class documentation section on ByHash() functions
Definition at line 434 of file Map.h.
◆ EmplaceByHash() [2/2]
See Emplace() and class documentation section on ByHash() functions
Definition at line 411 of file Map.h.
◆ Empty()
Removes all elements from the map.
This method potentially leaves space allocated for an expected number of elements about to be added.
- Parameters
-
ExpectedNumElements | The number of elements about to be added to the set. |
Definition at line 223 of file Map.h.
◆ end() [1/2]
◆ end() [2/2]
◆ FilterByPredicate()
Filters the elements in the map based on a predicate functor.
- Parameters
-
Pred | The functor to apply to each element. |
- Returns
- TMap with the same type as this object which contains the subset of elements for which the functor returns true.
Definition at line 491 of file Map.h.
◆ Find() [1/2]
Find the value associated with a specified key.
- Parameters
-
Key | The key to search for. |
- Returns
- A pointer to the value associated with the specified key, or nullptr if the key isn't contained in this map. The pointer is only valid until the next change to any key in the map.
Definition at line 512 of file Map.h.
◆ Find() [2/2]
◆ FindByHash() [1/2]
See Find() and class documentation section on ByHash() functions
Definition at line 528 of file Map.h.
◆ FindByHash() [2/2]
◆ FindChecked() [1/2]
Find a reference to the value associated with a specified key.
- Parameters
-
Key | The key to search for. |
- Returns
- The value associated with the specified key, or triggers an assertion if the key does not exist.
Definition at line 640 of file Map.h.
◆ FindChecked() [2/2]
Find a reference to the value associated with a specified key.
- Parameters
-
Key | The key to search for. |
- Returns
- The value associated with the specified key, or triggers an assertion if the key does not exist.
Definition at line 627 of file Map.h.
◆ FindKey()
Find the key associated with the specified value.
The time taken is O(N) in the number of pairs.
- Parameters
-
Value | The value to search for |
- Returns
- A pointer to the key associated with the specified value, or nullptr if the value isn't contained in this map. The pointer is only valid until the next change to any key in the map.
Definition at line 471 of file Map.h.
◆ FindOrAdd() [1/6]
Find the value associated with a specified key, or if none exists, adds a value using the default constructor.
- Parameters
-
Key | The key to search for. |
- Returns
- A reference to the value associated with the specified key.
Definition at line 595 of file Map.h.
◆ FindOrAdd() [2/6]
Find the value associated with a specified key, or if none exists, adds a value using the default constructor.
- Parameters
-
Key | The key to search for. |
Value | The value to associate with the key. |
- Returns
- A reference to the value associated with the specified key.
Definition at line 610 of file Map.h.
◆ FindOrAdd() [3/6]
◆ FindOrAdd() [4/6]
◆ FindOrAdd() [5/6]
◆ FindOrAdd() [6/6]
◆ FindOrAddByHash() [1/6]
See FindOrAdd() and class documentation section on ByHash() functions
Definition at line 599 of file Map.h.
◆ FindOrAddByHash() [2/6]
See FindOrAdd() and class documentation section on ByHash() functions
Definition at line 616 of file Map.h.
◆ FindOrAddByHash() [3/6]
◆ FindOrAddByHash() [4/6]
◆ FindOrAddByHash() [5/6]
◆ FindOrAddByHash() [6/6]
◆ FindOrAddImpl() [1/2]
Find the value associated with a specified key, or if none exists, adds a value using the default constructor.
- Parameters
-
Key | The key to search for. |
- Returns
- A reference to the value associated with the specified key.
Definition at line 557 of file Map.h.
◆ FindOrAddImpl() [2/2]
Find the value associated with a specified key, or if none exists, adds the value
- Parameters
-
Key | The key to search for. |
Value | The value to associate with the key. |
- Returns
- A reference to the value associated with the specified key.
Definition at line 576 of file Map.h.
◆ FindRef()
Find the value associated with a specified key.
- Parameters
-
Key | The key to search for. |
- Returns
- The value associated with the specified key, or the default value for the ValueType if the key isn't contained in this map.
Definition at line 653 of file Map.h.
◆ GenerateKeyArray()
Generate an array from the keys in this map.
- Parameters
-
OutArray | Will contain the collection of keys. |
Definition at line 692 of file Map.h.
◆ GenerateValueArray()
Generate an array from the values in this map.
- Parameters
-
OutArray | Will contain the collection of values. |
Definition at line 706 of file Map.h.
◆ GetAllocatedSize()
Helper function to return the amount of memory allocated by this container . Only returns the size of allocations made directly by the container, not the elements themselves.
- Returns
- Number of bytes allocated by this container.
- See also
- CountBytes
Definition at line 339 of file Map.h.
◆ GetKeys() [1/2]
Get the unique keys contained within this map.
- Parameters
-
OutKeys | Upon return, contains the set of unique keys in this map. |
- Returns
- The number of unique keys in the map.
Definition at line 281 of file Map.h.
◆ GetKeys() [2/2]
Get the unique keys contained within this map.
- Parameters
-
OutKeys | Upon return, contains the set of unique keys in this map. |
- Returns
- The number of unique keys in the map.
Definition at line 314 of file Map.h.
◆ HashKey()
◆ IsEmpty()
Returns true if the map is empty and contains no elements.
- Returns
- True if the map is empty.
- See also
- Num
Definition at line 264 of file Map.h.
◆ Num()
- Returns
- The number of elements in the map.
Definition at line 270 of file Map.h.
◆ operator=() [1/4]
◆ operator=() [2/4]
Assignment operator for copying elements from a TMap with a different SetAllocator
Definition at line 173 of file Map.h.
◆ operator=() [3/4]
◆ operator=() [4/4]
Assignment operator for moving elements from a TMap with a different SetAllocator
Definition at line 165 of file Map.h.
◆ OrderIndependentCompareEqual()
Compare this map with another for equality. Does not make any assumptions about Key order. NOTE: this might be a candidate for operator== but it was decided to make it an explicit function since it can potentially be quite slow.
- Parameters
-
Other | The other map to compare against |
- Returns
- True if both this and Other contain the same keys with values that compare ==
Definition at line 189 of file Map.h.
◆ Remove()
Remove all value associations for a key.
- Parameters
-
InKey | The key to remove associated values for. |
- Returns
- The number of values that were associated with the key.
Definition at line 447 of file Map.h.
◆ RemoveByHash()
See Remove() and class documentation section on ByHash() functions
Definition at line 455 of file Map.h.
◆ Reserve()
Preallocates enough memory to contain Number elements
Definition at line 253 of file Map.h.
◆ Reset()
Efficiently empties out the map but preserves all allocations and capacities
Definition at line 229 of file Map.h.
◆ Shrink()
Shrinks the pair set to avoid slack.
Definition at line 235 of file Map.h.
◆ WriteMemoryImage()
◆ TMapBase
◆ TMapPrivateFriend
◆ Pairs
A set of the key-value pairs in the map.
Definition at line 821 of file Map.h.
The documentation for this class was generated from the following file:
- C:/Users/lachl/Downloads/ArkServerAPI_NEW/ASA/AsaApi/AsaApi/Core/Public/API/UE/Containers/Map.h