2022-04-01 04:06:53 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: auHashMap.hpp
|
|
|
|
Date: 2022-2-1
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if !defined(AURORA_RUNTIME_AU_HASH_MAP)
|
|
|
|
#define AURORA_RUNTIME_AU_HASH_MAP std::unordered_map
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "auHashUtils.hpp"
|
|
|
|
|
2024-04-19 23:09:22 +00:00
|
|
|
template <class T, class Z, class Hash_t = AuHash::hash<T>, class Equal_t = AuHash::equal<T>, class Allocator_t = Aurora::Memory::ClassArrayAllocator<AuPair<const T, Z>>>
|
|
|
|
using AuHashMap = AURORA_RUNTIME_AU_HASH_MAP<T, Z, Hash_t, Equal_t, Allocator_t>;
|
2023-03-13 16:59:21 +00:00
|
|
|
|
2024-04-20 22:38:11 +00:00
|
|
|
template <class T, class Z, class Hash_t = AuHash::hash<T>, class Equal_t = AuHash::equal<T>>
|
|
|
|
using AuHashMapOfHeap = AuHashMap<T, Z, Hash_t, Equal_t, Aurora::Memory::CppHeapWrapper<AuPair<const T, Z>>>;
|
|
|
|
|
2023-03-13 16:59:21 +00:00
|
|
|
template<typename T>
|
|
|
|
struct AuIsHashMap : AuFalseType
|
|
|
|
{ };
|
|
|
|
|
2024-04-19 23:09:22 +00:00
|
|
|
template<typename T, typename Z, typename H, typename E, typename A>
|
|
|
|
struct AuIsHashMap<AuHashMap<T, Z, H, E, A>> : AuTrueType
|
2023-03-13 16:59:21 +00:00
|
|
|
{ };
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
inline constexpr bool AuIsHashMap_v = AuIsHashMap<T>::type::value;
|