5#if (defined(__AUTORTFM) && __AUTORTFM)
11#include <unordered_map>
17template<
typename KeyType,
typename ValueType>
27template<
typename KeyType,
typename ValueType,
typename Hash = std::hash<KeyType>,
typename Equal = std::equal_to<KeyType>>
30 using FInnerMap = std::unordered_map<KeyType, ValueType, Hash, Equal, StlAllocator<std::pair<const KeyType, ValueType>>>;
35 using FInnerIterator = std::conditional_t<bConst, typename FInnerMap::const_iterator, typename FInnerMap::iterator>;
55 using FPair = std::conditional_t<
bConst,
56 const std::pair<const KeyType, ValueType>,
57 std::pair<const KeyType, ValueType>>;
60 static_assert(std::is_same_v<
decltype(Pair->first),
decltype(
KeyAndValue->Key)>);
61 static_assert(std::is_same_v<
decltype(Pair->second),
decltype(
KeyAndValue->Value)>);
91 using Value = ValueType;
124 template<
typename K,
typename V>
127 Map[std::forward<K>(Key)] = std::forward<V>(
Value);
135 ValueType*
Find(K&& Key)
137 typename FInnerMap::iterator It =
Map.find(std::forward<K>(Key));
138 return It ==
Map.end() ? nullptr : &It->second;
147 ValueType& FindOrAdd(K&& Key)
149 return Map[std::forward<K>(Key)];
154 void Remove(
const KeyType& Key)
162 return Map.count(Key) != 0;
191 ConstIterator
begin()
const {
return ConstIterator{
Map.begin()}; }
192 ConstIterator
end()
const {
return ConstIterator{
Map.end()}; }
193 Iterator
begin() {
return Iterator{
Map.begin()}; }
194 Iterator
end() {
return Iterator{
Map.end()}; }
UE_FORCEINLINE_HINT FLinearColor operator*(float Scalar, const FLinearColor &Color)
Definition Color.h:473
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_FORCEINLINE_HINT bool operator!=(const FIndexedPointer &Other) const
Definition LockFreeList.h:76
TIndexedContainerIterator< TArray< FPreviewAttachedObjectPair >, FPreviewAttachedObjectPair, int32 > TIterator
Definition PreviewAssetAttachComponent.h:68
@ Contains
Definition AutomationTest.h:160
FORCEINLINE FStridedReferenceIterator begin(FStridedReferenceView View)
Definition FastReferenceCollector.h:490
FORCEINLINE FStridedReferenceIterator end(FStridedReferenceView View)
Definition FastReferenceCollector.h:491