Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > Class Template Reference

#include <Map.h>

+ Inheritance diagram for TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >:
+ Collaboration diagram for TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >:

Classes

class  TBaseIterator
 
class  TBaseKeyIterator
 
class  TConstIterator
 
class  TConstKeyIterator
 
class  TIterator
 
class  TKeyIterator
 

Public Types

typedef TTypeTraits< KeyType >::ConstPointerType KeyConstPointerType
 
typedef TTypeTraits< KeyType >::ConstInitType KeyInitType
 
typedef TTypeTraits< ValueType >::ConstInitType ValueInitType
 
typedef TPair< KeyType, ValueType > ElementType
 
using TRangedForIterator = TBaseIterator<false, true>
 
using TRangedForConstIterator = TBaseIterator<true, true>
 

Public Member Functions

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)
 
FORCEINLINE int32 Num () const
 
template<typename Allocator >
int32 GetKeys (TArray< KeyType, Allocator > &OutKeys) const
 
FORCEINLINE uint32 GetAllocatedSize () 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 & Add (const KeyType &InKey)
 
FORCEINLINE ValueType & Add (KeyType &&InKey)
 
template<typename InitKeyType , typename InitValueType >
ValueType & Emplace (InitKeyType &&InKey, InitValueType &&InValue)
 
template<typename InitKeyType >
ValueType & Emplace (InitKeyType &&InKey)
 
FORCEINLINE int32 Remove (KeyConstPointerType InKey)
 
const KeyType * FindKey (ValueInitType Value) const
 
FORCEINLINE ValueType * Find (KeyConstPointerType Key)
 
FORCEINLINE const ValueType * Find (KeyConstPointerType Key) const
 
FORCEINLINE ValueType & FindOrAdd (const KeyType &Key)
 
FORCEINLINE ValueType & FindOrAdd (KeyType &&Key)
 
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 Allocator >
void GenerateKeyArray (TArray< KeyType, Allocator > &OutArray) const
 
template<typename Allocator >
void GenerateValueArray (TArray< ValueType, Allocator > &OutArray) const
 
FORCEINLINE TIterator CreateIterator ()
 
FORCEINLINE TConstIterator CreateConstIterator () const
 
FORCEINLINE TKeyIterator CreateKeyIterator (KeyInitType InKey)
 
FORCEINLINE TConstKeyIterator CreateConstKeyIterator (KeyInitType InKey) const
 

Protected Types

typedef TSet< ElementType, KeyFuncs, SetAllocator > ElementSetType
 

Protected Member Functions

 TMapBase ()=default
 
 TMapBase (TMapBase &&)=default
 
 TMapBase (const TMapBase &)=default
 
TMapBaseoperator= (TMapBase &&)=default
 
TMapBaseoperator= (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 >
TMapBaseoperator= (TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &&Other)
 
template<typename OtherSetAllocator >
TMapBaseoperator= (const TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > &Other)
 

Protected Attributes

ElementSetType Pairs
 

Private Member Functions

template<typename ArgType >
FORCEINLINE ValueType & FindOrAddImpl (ArgType &&Arg)
 

Friends

template<typename OtherKeyType , typename OtherValueType , typename OtherSetAllocator , typename OtherKeyFuncs >
class TMapBase
 
struct TContainerTraits< TMapBase >
 
bool LegacyCompareEqual (const TMapBase &A, const TMapBase &B)
 
bool LegacyCompareNotEqual (const TMapBase &A, const TMapBase &B)
 
FORCEINLINE friend TRangedForIterator begin (TMapBase &MapBase)
 
FORCEINLINE friend TRangedForConstIterator begin (const TMapBase &MapBase)
 
FORCEINLINE friend TRangedForIterator end (TMapBase &MapBase)
 
FORCEINLINE friend TRangedForConstIterator end (const TMapBase &MapBase)
 

Detailed Description

template<typename KeyType, typename ValueType, typename SetAllocator, typename KeyFuncs>
class TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >

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.

Definition at line 103 of file Map.h.

Member Typedef Documentation

◆ ElementSetType

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
typedef TSet<ElementType, KeyFuncs, SetAllocator> TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::ElementSetType
protected

Definition at line 526 of file Map.h.

◆ ElementType

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
typedef TPair<KeyType, ValueType> TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::ElementType

Definition at line 114 of file Map.h.

◆ KeyConstPointerType

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
typedef TTypeTraits<KeyType>::ConstPointerType TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::KeyConstPointerType

Definition at line 111 of file Map.h.

◆ KeyInitType

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
typedef TTypeTraits<KeyType>::ConstInitType TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::KeyInitType

Definition at line 112 of file Map.h.

◆ TRangedForConstIterator

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
using TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::TRangedForConstIterator = TBaseIterator<true, true>

Definition at line 672 of file Map.h.

◆ TRangedForIterator

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
using TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::TRangedForIterator = TBaseIterator<false, true>

Definition at line 671 of file Map.h.

◆ ValueInitType

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
typedef TTypeTraits<ValueType>::ConstInitType TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::ValueInitType

Definition at line 113 of file Map.h.

Constructor & Destructor Documentation

◆ TMapBase() [1/5]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::TMapBase ( )
protecteddefault

◆ TMapBase() [2/5]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::TMapBase ( TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > && )
protecteddefault

◆ TMapBase() [3/5]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::TMapBase ( const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & )
protecteddefault

◆ TMapBase() [4/5]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename OtherSetAllocator >
TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::TMapBase ( TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > && Other)
inlineprotected

Constructor for moving elements from a TMap with a different SetAllocator

Definition at line 138 of file Map.h.

◆ TMapBase() [5/5]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename OtherSetAllocator >
TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::TMapBase ( const TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > & Other)
inlineprotected

Constructor for copying elements from a TMap with a different SetAllocator

Definition at line 144 of file Map.h.

Member Function Documentation

◆ Add() [1/6]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Add ( const KeyType & InKey)
inline

Set a default value associated with a key.

Parameters
InKeyThe 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 307 of file Map.h.

◆ Add() [2/6]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::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.
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 296 of file Map.h.

◆ Add() [3/6]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Add ( const KeyType & InKey,
ValueType && InValue )
inline

Definition at line 297 of file Map.h.

◆ Add() [4/6]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Add ( KeyType && InKey)
inline

Definition at line 308 of file Map.h.

◆ Add() [5/6]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Add ( KeyType && InKey,
const ValueType & InValue )
inline

Definition at line 298 of file Map.h.

◆ Add() [6/6]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Add ( KeyType && InKey,
ValueType && InValue )
inline

Definition at line 299 of file Map.h.

◆ Compact()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE void TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Compact ( )
inline

Compacts the pair set to remove holes

Definition at line 235 of file Map.h.

◆ CompactStable()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE void TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::CompactStable ( )
inline

Compacts the pair set to remove holes. Does not change the iteration order of the elements.

Definition at line 241 of file Map.h.

◆ Contains()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE bool TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Contains ( KeyConstPointerType Key) const
inline

Check if map contains the specified key.

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

Definition at line 492 of file Map.h.

◆ CreateConstIterator()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE TConstIterator TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::CreateConstIterator ( ) const
inline

Creates a const iterator over all the pairs in this map

Definition at line 705 of file Map.h.

◆ CreateConstKeyIterator()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE TConstKeyIterator TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::CreateConstKeyIterator ( KeyInitType InKey) const
inline

Creates a const iterator over the values associated with a specified key in a map

Definition at line 717 of file Map.h.

◆ CreateIterator()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE TIterator TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::CreateIterator ( )
inline

Creates an iterator over all the pairs in this map

Definition at line 699 of file Map.h.

◆ CreateKeyIterator()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE TKeyIterator TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::CreateKeyIterator ( KeyInitType InKey)
inline

Creates an iterator over the values associated with a specified key in a map

Definition at line 711 of file Map.h.

◆ Emplace() [1/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename InitKeyType >
ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Emplace ( InitKeyType && InKey)
inline

Set a default value associated with a key.

Parameters
InKeyThe 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 331 of file Map.h.

◆ Emplace() [2/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename InitKeyType , typename InitValueType >
ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::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.
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 317 of file Map.h.

◆ Empty()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE void TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Empty ( int32 ExpectedNumElements = 0)
inline

Removes all elements from the map.

This method potentially leaves space allocated for an expected number of elements about to be added.

Parameters
ExpectedNumElementsThe number of elements about to be added to the set.

Definition at line 217 of file Map.h.

◆ Find() [1/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType * TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Find ( KeyConstPointerType Key)
inline

Find the value associated with a specified key.

Parameters
KeyThe 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 379 of file Map.h.

◆ Find() [2/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE const ValueType * TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Find ( KeyConstPointerType Key) const
inline

Definition at line 388 of file Map.h.

◆ FindChecked() [1/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::FindChecked ( KeyConstPointerType Key)
inline

Find a reference to the value associated with a specified key.

Parameters
KeyThe 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 463 of file Map.h.

◆ FindChecked() [2/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE const ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::FindChecked ( KeyConstPointerType Key) const
inline

Find the value associated with a specified key, or if none exists, adds a value using the key as the constructor parameter.

Parameters
KeyThe key to search for.
Returns
A reference to the value associated with the specified key. Find a reference to the value associated with a specified key.
Parameters
KeyThe 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 450 of file Map.h.

◆ FindKey()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
const KeyType * TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::FindKey ( ValueInitType Value) const
inline

Find the key associated with the specified value.

The time taken is O(N) in the number of pairs.

Parameters
ValueThe 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 360 of file Map.h.

◆ FindOrAdd() [1/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::FindOrAdd ( const KeyType & Key)
inline

Find the value associated with a specified key, or if none exists, adds a value using the default constructor.

Parameters
KeyThe key to search for.
Returns
A reference to the value associated with the specified key.

Definition at line 420 of file Map.h.

◆ FindOrAdd() [2/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::FindOrAdd ( KeyType && Key)
inline

Definition at line 421 of file Map.h.

◆ FindOrAddImpl()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename ArgType >
FORCEINLINE ValueType & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::FindOrAddImpl ( ArgType && Arg)
inlineprivate

Find the value associated with a specified key, or if none exists, adds a value using the default constructor.

Parameters
KeyThe key to search for.
Returns
A reference to the value associated with the specified key.

Definition at line 403 of file Map.h.

◆ FindRef()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE ValueType TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::FindRef ( KeyConstPointerType Key) const
inline

Find the value associated with a specified key.

Parameters
KeyThe 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 476 of file Map.h.

◆ GenerateKeyArray()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename Allocator >
void TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::GenerateKeyArray ( TArray< KeyType, Allocator > & OutArray) const
inline

Generate an array from the keys in this map.

Parameters
OutArrayWill contain the collection of keys.

Definition at line 502 of file Map.h.

◆ GenerateValueArray()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename Allocator >
void TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::GenerateValueArray ( TArray< ValueType, Allocator > & OutArray) const
inline

Generate an array from the values in this map.

Parameters
OutArrayWill contain the collection of values.

Definition at line 516 of file Map.h.

◆ GetAllocatedSize()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE uint32 TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::GetAllocatedSize ( ) const
inline

Helper function to return the amount of memory allocated by this container .

Returns
Number of bytes allocated by this container.
See also
CountBytes

Definition at line 284 of file Map.h.

◆ GetKeys()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename Allocator >
int32 TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::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.

Definition at line 264 of file Map.h.

◆ Num()

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

Definition at line 253 of file Map.h.

◆ operator=() [1/4]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
TMapBase & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::operator= ( const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & )
protecteddefault

◆ operator=() [2/4]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename OtherSetAllocator >
TMapBase & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::operator= ( const TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > & Other)
inlineprotected

Assignment operator for copying elements from a TMap with a different SetAllocator

Definition at line 158 of file Map.h.

◆ operator=() [3/4]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
TMapBase & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::operator= ( TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > && )
protecteddefault

◆ operator=() [4/4]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename OtherSetAllocator >
TMapBase & TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::operator= ( TMapBase< KeyType, ValueType, OtherSetAllocator, KeyFuncs > && Other)
inlineprotected

Assignment operator for moving elements from a TMap with a different SetAllocator

Definition at line 150 of file Map.h.

◆ OrderIndependentCompareEqual()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
bool TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::OrderIndependentCompareEqual ( const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & Other) const
inline

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
OtherThe other map to compare against
Returns
True if both this and Other contain the same keys with values that compare ==

Definition at line 183 of file Map.h.

◆ Remove()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE int32 TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::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.

Definition at line 344 of file Map.h.

◆ Reserve()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE void TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Reserve ( int32 Number)
inline

Preallocates enough memory to contain Number elements

Definition at line 247 of file Map.h.

◆ Reset()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE void TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Reset ( )
inline

Efficiently empties out the map but preserves all allocations and capacities

Definition at line 223 of file Map.h.

◆ Shrink()

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE void TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Shrink ( )
inline

Shrinks the pair set to avoid slack.

Definition at line 229 of file Map.h.

Friends And Related Symbol Documentation

◆ begin [1/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE friend TRangedForConstIterator begin ( const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & MapBase)
friend

Definition at line 728 of file Map.h.

◆ begin [2/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE friend TRangedForIterator begin ( TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & MapBase)
friend

DO NOT USE DIRECTLY STL-like iterators to enable range-based for loop support.

Definition at line 727 of file Map.h.

◆ end [1/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE friend TRangedForConstIterator end ( const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & MapBase)
friend

Definition at line 730 of file Map.h.

◆ end [2/2]

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
FORCEINLINE friend TRangedForIterator end ( TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & MapBase)
friend

Definition at line 729 of file Map.h.

◆ LegacyCompareEqual

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
bool LegacyCompareEqual ( const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & A,
const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & B )
friend

Definition at line 166 of file Map.h.

◆ LegacyCompareNotEqual

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
bool LegacyCompareNotEqual ( const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & A,
const TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs > & B )
friend

Definition at line 170 of file Map.h.

◆ TContainerTraits< TMapBase >

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
friend struct TContainerTraits< TMapBase >
friend

Definition at line 106 of file Map.h.

◆ TMapBase

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
template<typename OtherKeyType , typename OtherValueType , typename OtherSetAllocator , typename OtherKeyFuncs >
friend class TMapBase
friend

Definition at line 106 of file Map.h.

Member Data Documentation

◆ Pairs

template<typename KeyType , typename ValueType , typename SetAllocator , typename KeyFuncs >
ElementSetType TMapBase< KeyType, ValueType, SetAllocator, KeyFuncs >::Pairs
protected

A set of the key-value pairs in the map.

Definition at line 621 of file Map.h.


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