2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _RSTL_HASH_MAP
|
|
|
|
#define _RSTL_HASH_MAP
|
2022-09-13 04:26:54 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#include "rstl/list.hpp"
|
|
|
|
#include "rstl/pair.hpp"
|
|
|
|
#include "rstl/red_black_tree.hpp"
|
|
|
|
#include "rstl/rmemory_allocator.hpp"
|
|
|
|
#include "rstl/vector.hpp"
|
|
|
|
|
|
|
|
namespace rstl {
|
2022-09-18 06:05:46 +00:00
|
|
|
template < typename K, typename P, int unk, typename Select, typename Hash, typename Equal,
|
|
|
|
typename Alloc = rmemory_allocator >
|
2022-09-13 04:26:54 +00:00
|
|
|
class hash_table {
|
|
|
|
private:
|
|
|
|
rstl::vector< rstl::list< P, Alloc > /*::iterator*/, Alloc > x;
|
|
|
|
};
|
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
template < typename K, typename V, typename Hash, typename Equal,
|
|
|
|
typename Alloc = rmemory_allocator >
|
2022-09-13 04:26:54 +00:00
|
|
|
class hash_map {
|
|
|
|
typedef rstl::pair< K, V > Pair;
|
|
|
|
|
|
|
|
private:
|
|
|
|
hash_table< K, Pair, 0, select1st< Pair >, Hash, Equal, Alloc > table;
|
|
|
|
};
|
|
|
|
} // namespace rstl
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _RSTL_HASH_MAP
|