UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy > Class Template Reference

#include <StripedMap.h>

+ Inheritance diagram for TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >:

Classes

struct  FBucket
 
struct  FDebuggableExclusiveLock
 
struct  FDebuggableMutex
 
struct  FDebuggableSharedLock
 

Public Types

typedef BaseMapType MapType
 
typedef BaseMapType::KeyConstPointerType KeyConstPointerType
 
typedef KeyFuncs KeyFuncsType
 

Public Member Functions

ValueType FindRef (KeyConstPointerType InKey) const
 
template<typename FunctionType >
bool FindAndApply (KeyConstPointerType InKey, FunctionType &&InFunction) const
 
template<typename UpdateFunctionType >
bool FindAndApply (KeyConstPointerType InKey, UpdateFunctionType &&InUpdateFunction)
 
bool Contains (KeyConstPointerType InKey) const
 
template<typename InitKeyType = KeyType, typename InitValueType = ValueType>
void Emplace (InitKeyType &&InKey, InitValueType &&InValue)
 
void Add (const KeyType &InKey, const ValueType &InValue)
 
void Add (const KeyType &InKey, ValueType &&InValue)
 
void Add (KeyType &&InKey, const ValueType &InValue)
 
void Add (KeyType &&InKey, ValueType &&InValue)
 
template<typename ProduceFunctionType >
ValueType FindOrProduce (const KeyType &InKey, ProduceFunctionType &&InProduceFunction)
 
template<typename ProduceFunctionType , typename ApplyFunctionType >
void FindOrProduceAndApply (const KeyType &InKey, ProduceFunctionType &&InProduceFunction, ApplyFunctionType &&InApplyFunction)
 
template<typename TryProduceFunctionType , typename ApplyFunctionType >
bool FindOrTryProduceAndApply (const KeyType &InKey, TryProduceFunctionType &&InTryProduceFunction, ApplyFunctionType &&InApplyFunction)
 
template<typename ProduceFunctionType , typename ApplyFunctionType >
void FindOrProduceAndApplyForWrite (const KeyType &InKey, ProduceFunctionType &&InProduceFunction, ApplyFunctionType &&InApplyFunction)
 
template<typename TryProduceFunctionType , typename ApplyFunctionType >
bool FindOrTryProduceAndApplyForWrite (const KeyType &InKey, TryProduceFunctionType &&InTryProduceFunction, ApplyFunctionType &&InApplyFunction)
 
int32 Remove (KeyConstPointerType InKey)
 
int32 RemoveByHash (uint32 InKeyHash, KeyConstPointerType InKey)
 
template<typename PredicateType >
int32 RemoveIf (KeyConstPointerType InKey, PredicateType &&InPredicate)
 
template<typename PredicateType >
int32 RemoveIf (PredicateType &&InPredicate)
 
bool RemoveAndCopyValue (KeyConstPointerType InKey, ValueType &OutRemovedValue)
 
ValueType FindAndRemoveChecked (KeyConstPointerType InKey)
 
void Empty ()
 
void Reset ()
 
void Shrink ()
 
void Compact ()
 
int32 Num () const
 
template<typename FunctionType >
void ForEach (FunctionType &&InFunction)
 
template<typename FunctionType >
void ForEach (FunctionType &&InFunction) const
 
template<typename Allocator >
int32 GetKeys (TArray< KeyType, Allocator > &OutKeys) const
 

Protected Types

typedef LockingPolicy::MutexType MutexType
 
typedef LockingPolicy::ExclusiveLockType ExclusiveLockType
 
typedef LockingPolicy::SharedLockType SharedLockType
 

Protected Member Functions

uint32 GetBucketIndex (uint32 Hash) const
 
template<typename FunctionType >
decltype(autoApplyUnlockedByHash (uint32 InHash, FunctionType &&InFunction)
 
template<typename FunctionType >
decltype(autoApplyUnlocked (KeyConstPointerType InKey, FunctionType &&InFunction)
 
template<typename LockType , typename FunctionType >
decltype(autoApplyByHash (uint32 InHash, FunctionType &&InFunction) const
 
template<typename LockType , typename FunctionType >
decltype(autoApply (KeyConstPointerType InKey, FunctionType &&InFunction) const
 
template<typename LockType , typename FunctionType >
decltype(autoApplyByHash (uint32 InHash, FunctionType &&InFunction)
 
template<typename LockType , typename FunctionType >
decltype(autoApply (KeyConstPointerType InKey, FunctionType &&InFunction)
 
template<typename FunctionType >
decltype(autoWrite (KeyConstPointerType InKey, FunctionType &&InFunction)
 
template<typename FunctionType >
decltype(autoWriteByHash (uint32 InHash, KeyConstPointerType InKey, FunctionType &&InFunction)
 
template<typename FunctionType >
decltype(autoRead (KeyConstPointerType InKey, FunctionType &&InFunction)
 
template<typename FunctionType >
decltype(autoReadByHash (uint32 InHash, KeyConstPointerType InKey, FunctionType &&InFunction)
 
template<typename FunctionType >
decltype(autoRead (KeyConstPointerType InKey, FunctionType &&InFunction) const
 
template<typename FunctionType >
decltype(autoReadByHash (uint32 InHash, KeyConstPointerType InKey, FunctionType &&InFunction) const
 
template<typename FunctionType >
void ForEachMap (FunctionType &&InFunction)
 
template<typename FunctionType >
void ForEachMap (FunctionType &&InFunction) const
 

Protected Attributes

struct TStripedMapBase::FBucket Buckets [BucketCount]
 

Detailed Description

template<int32 BucketCount, typename BaseMapType, typename KeyType, typename ValueType, typename SetAllocator, typename KeyFuncs, typename LockingPolicy>
class TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >

The base class of striped maps which is a wrapper that adds thread-safety and contention reduction over regular maps.

The interface is slightly modified compared to regular maps to avoid some thread-safety issues that would arise if we returned pointers or reference to memory inside the map after the lock on a bucket had been released.

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. This class manage this automatically so you don't have to work with ByHash function in this case.

Member Typedef Documentation

◆ ExclusiveLockType

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
typedef LockingPolicy::ExclusiveLockType TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ExclusiveLockType
protected

◆ KeyConstPointerType

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
typedef BaseMapType::KeyConstPointerType TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::KeyConstPointerType

◆ KeyFuncsType

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
typedef KeyFuncs TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::KeyFuncsType

◆ MapType

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
typedef BaseMapType TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::MapType

◆ MutexType

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
typedef LockingPolicy::MutexType TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::MutexType
protected

◆ SharedLockType

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
typedef LockingPolicy::SharedLockType TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::SharedLockType
protected

Member Function Documentation

◆ Add() [1/4]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Add ( const KeyType &  InKey,
const ValueType &  InValue 
)
inline

Set the value associated with a key.

Parameters
InKeyThe key to associate the value with.
InValueThe value to associate with the key.

◆ Add() [2/4]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Add ( const KeyType &  InKey,
ValueType &&  InValue 
)
inline

Set the value associated with a key.

Parameters
InKeyThe key to associate the value with.
InValueThe value to associate with the key.

◆ Add() [3/4]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Add ( KeyType &&  InKey,
const ValueType &  InValue 
)
inline

Set the value associated with a key.

Parameters
InKeyThe key to associate the value with.
InValueThe value to associate with the key.

◆ Add() [4/4]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Add ( KeyType &&  InKey,
ValueType &&  InValue 
)
inline

Set the value associated with a key.

Parameters
InKeyThe key to associate the value with.
InValueThe value to associate with the key.

◆ Apply() [1/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename LockType , typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Apply ( KeyConstPointerType  InKey,
FunctionType &&  InFunction 
)
inlineprotected

◆ Apply() [2/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename LockType , typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Apply ( KeyConstPointerType  InKey,
FunctionType &&  InFunction 
) const
inlineprotected

◆ ApplyByHash() [1/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename LockType , typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ApplyByHash ( uint32  InHash,
FunctionType &&  InFunction 
)
inlineprotected

◆ ApplyByHash() [2/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename LockType , typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ApplyByHash ( uint32  InHash,
FunctionType &&  InFunction 
) const
inlineprotected

◆ ApplyUnlocked()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ApplyUnlocked ( KeyConstPointerType  InKey,
FunctionType &&  InFunction 
)
inlineprotected

◆ ApplyUnlockedByHash()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ApplyUnlockedByHash ( uint32  InHash,
FunctionType &&  InFunction 
)
inlineprotected

◆ Compact()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Compact ( )
inline

Compacts the pair set to remove holes

◆ Contains()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
bool TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Contains ( KeyConstPointerType  InKey) const
inline

Check if map contains the specified key.

Parameters
InKeyThe key to check for.
Returns
true if the map contains the key.

◆ Emplace()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename InitKeyType = KeyType, typename InitValueType = ValueType>
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Emplace ( InitKeyType &&  InKey,
InitValueType &&  InValue 
)
inline

Sets the value associated with a key.

Parameters
InKeyThe key to associate the value with.
InValueThe value to associate with the key.

◆ Empty()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Empty ( )
inline

Removes all elements from the map.

◆ FindAndApply() [1/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
bool TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindAndApply ( KeyConstPointerType  InKey,
FunctionType &&  InFunction 
) const
inline

Calls a function when the value is found while holding a lock on the map.

Best for more complex types that you don't want to wrap under TSharedPtr and where returning a copy would be wasteful.

Parameters
InKeyThe key to look for.
InFunctionThe function to call on the value (if found).
Returns
true if the map contains the key and a value was found.

◆ FindAndApply() [2/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
bool TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindAndApply ( KeyConstPointerType  InKey,
UpdateFunctionType &&  InUpdateFunction 
)
inline

Calls a function to update a value if it has been found.

Parameters
InKeyThe key to check for.
InUpdateFunctionThe function to call on the value (if found).
Returns
true if the map contains the key and a value was found.

◆ FindAndRemoveChecked()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
ValueType TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindAndRemoveChecked ( KeyConstPointerType  InKey)
inline

Find a pair with the specified key, removes it from the map, and returns the value part of the pair.

If no pair was found, an exception is thrown.

Parameters
InKeyThe key to search for
Returns
The value that was removed

◆ FindOrProduce()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
ValueType TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindOrProduce ( const KeyType &  InKey,
ProduceFunctionType &&  InProduceFunction 
)
inline

Finds or produce a value associated with the key.

Parameters
InKeyThe key to look for.
InProduceFunctionThe function to call to produce a new value if the key is missing.
Returns
a copy the value associated with the key.

◆ FindOrProduceAndApply()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindOrProduceAndApply ( const KeyType &  InKey,
ProduceFunctionType &&  InProduceFunction,
ApplyFunctionType &&  InApplyFunction 
)
inline

Calls ProduceFunction to produce a value if the key is missing, then calls ApplyFunction on the value.

Parameters
InKeyThe key to look for.
InProduceFunctionThe function to call to produce a new value associated with the key.
InApplyFunctionThe function to call with the const value reference when the key is found or has been produced.

◆ FindOrProduceAndApplyForWrite()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindOrProduceAndApplyForWrite ( const KeyType &  InKey,
ProduceFunctionType &&  InProduceFunction,
ApplyFunctionType &&  InApplyFunction 
)
inline

Calls ProduceFunction to produce a value if the key is missing, then calls ApplyFunction on the value.

Parameters
InKeyThe key to look for.
InProduceFunctionThe function to call to produce a new value associated with the key.
InApplyFunctionThe function to call with the value reference when the key is found or has been produced.

◆ FindOrTryProduceAndApply()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
bool TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindOrTryProduceAndApply ( const KeyType &  InKey,
TryProduceFunctionType &&  InTryProduceFunction,
ApplyFunctionType &&  InApplyFunction 
)
inline

Calls TryProduceFunction to produce a value if the key is missing, then calls ApplyFunction on the value if one exists.

Parameters
InKeyThe key to look for.
InTryProduceFunctionThe function to call to produce a new value associated with the key.
InApplyFunctionThe function to call with the const value reference when the key is found or has been produced.
Returns
true if a value was found or produced, false if TryProduceFunction failed.

◆ FindOrTryProduceAndApplyForWrite()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
bool TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindOrTryProduceAndApplyForWrite ( const KeyType &  InKey,
TryProduceFunctionType &&  InTryProduceFunction,
ApplyFunctionType &&  InApplyFunction 
)
inline

Calls TryProduceFunction to produce a value if the key is missing, then calls ApplyFunction on the value if one exists.

Parameters
InKeyThe key to look for.
InTryProduceFunctionThe function to call to produce a new value associated with the key.
InApplyFunctionThe function to call with the value reference when the key is found or has been produced.
Returns
true if a value was found or produced, false if TryProduceFunction failed.

◆ FindRef()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
ValueType TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::FindRef ( KeyConstPointerType  InKey) const
inline

Gets you a copy of the value.

Best for simple value types like PODs or TSharedPtr.

Parameters
InKeyThe key to look for.
Returns
a copy of the value for this key.

◆ ForEach() [1/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ForEach ( FunctionType &&  InFunction)
inline

Calls a function on all elements of the map with exclusive access (elements can be modified).

Parameters
InFunctionThe callback to run on each Pair of the map.

◆ ForEach() [2/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ForEach ( FunctionType &&  InFunction) const
inline

Calls a function on all elements of the map with shared access (elements can only be read).

Parameters
InFunctionThe callback to run on each Pair of the map.

◆ ForEachMap() [1/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ForEachMap ( FunctionType &&  InFunction)
inlineprotected

◆ ForEachMap() [2/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ForEachMap ( FunctionType &&  InFunction) const
inlineprotected

◆ GetBucketIndex()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
uint32 TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::GetBucketIndex ( uint32  Hash) const
inlineprotected

◆ GetKeys()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename Allocator >
int32 TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::GetKeys ( TArray< KeyType, Allocator > &  OutKeys) const
inline

Get the unique keys contained within this map.

Parameters
OutKeysUpon return, contains the set of unique keys in this map.
Returns
The number of unique keys in the map.

◆ Num()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
int32 TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Num ( ) const
inline
Returns
The number of elements in the map.

◆ Read() [1/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Read ( KeyConstPointerType  InKey,
FunctionType &&  InFunction 
)
inlineprotected

◆ Read() [2/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Read ( KeyConstPointerType  InKey,
FunctionType &&  InFunction 
) const
inlineprotected

◆ ReadByHash() [1/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ReadByHash ( uint32  InHash,
KeyConstPointerType  InKey,
FunctionType &&  InFunction 
)
inlineprotected

◆ ReadByHash() [2/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::ReadByHash ( uint32  InHash,
KeyConstPointerType  InKey,
FunctionType &&  InFunction 
) const
inlineprotected

◆ Remove()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
int32 TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Remove ( KeyConstPointerType  InKey)
inline

Remove all value associations for a key.

Parameters
InKeyThe key to remove associated values for.
Returns
The number of values that were associated with the key.

◆ RemoveAndCopyValue()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
bool TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::RemoveAndCopyValue ( KeyConstPointerType  InKey,
ValueType &  OutRemovedValue 
)
inline

Remove the pair with the specified key and copies the value that was removed to the ref parameter

Parameters
InKeyThe key to search for
OutRemovedValueIf found, the value that was removed (not modified if the key was not found)
Returns
whether or not the key was found

◆ RemoveByHash()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
int32 TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::RemoveByHash ( uint32  InKeyHash,
KeyConstPointerType  InKey 
)
inline

See Remove() and class documentation section on ByHash() functions

◆ RemoveIf() [1/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename PredicateType >
int32 TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::RemoveIf ( KeyConstPointerType  InKey,
PredicateType &&  InPredicate 
)
inline

Removes only the element associated by the key if the predicate returns true.

Parameters
InKeyThe key to remove associated values for.
InPredicateThe predicate to call to determine if a value should be removed.
Returns
The number of values that were removed.

◆ RemoveIf() [2/2]

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename PredicateType >
int32 TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::RemoveIf ( PredicateType &&  InPredicate)
inline

Removes all elements where the predicate returns true.

Parameters
InPredicateThe predicate to call to determine if a pair should be removed.
Returns
The number of pairs that were removed.

◆ Reset()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Reset ( )
inline

Efficiently empties out the map but preserves all allocations and capacities

◆ Shrink()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
void TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Shrink ( )
inline

Shrinks the pair set to avoid slack.

◆ Write()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Write ( KeyConstPointerType  InKey,
FunctionType &&  InFunction 
)
inlineprotected

◆ WriteByHash()

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
template<typename FunctionType >
decltype(auto) TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::WriteByHash ( uint32  InHash,
KeyConstPointerType  InKey,
FunctionType &&  InFunction 
)
inlineprotected

Member Data Documentation

◆ Buckets

template<int32 BucketCount, typename BaseMapType , typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs , typename LockingPolicy >
struct TStripedMapBase::FBucket TStripedMapBase< BucketCount, BaseMapType, KeyType, ValueType, SetAllocator, KeyFuncs, LockingPolicy >::Buckets[BucketCount]
protected

The documentation for this class was generated from the following file: