xrpld
Loading...
Searching...
No Matches
UnorderedContainers.h
1#pragma once
2
3#include <xrpl/basics/hardened_hash.h>
4#include <xrpl/basics/partitioned_unordered_map.h>
5#include <xrpl/beast/hash/uhash.h>
6#include <xrpl/beast/hash/xxhasher.h>
7
8#include <functional>
9#include <memory>
10#include <unordered_map>
11#include <unordered_set>
12#include <utility>
13
25
26namespace xrpl {
27
28// hash containers
29
30template <
31 class Key,
32 class Value,
33 class Hash = beast::Uhash<>,
34 class Pred = std::equal_to<Key>,
35 class Allocator = std::allocator<std::pair<Key const, Value>>>
37
38template <
39 class Key,
40 class Value,
41 class Hash = beast::Uhash<>,
42 class Pred = std::equal_to<Key>,
45
46template <
47 class Value,
48 class Hash = beast::Uhash<>,
49 class Pred = std::equal_to<Value>,
50 class Allocator = std::allocator<Value>>
52
53template <
54 class Value,
55 class Hash = beast::Uhash<>,
56 class Pred = std::equal_to<Value>,
57 class Allocator = std::allocator<Value>>
59
60// hardened_hash containers
61
63
64template <
65 class Key,
66 class Value,
67 class Hash = HardenedHash<strong_hash>,
68 class Pred = std::equal_to<Key>,
71
72template <
73 class Key,
74 class Value,
75 class Hash = HardenedHash<strong_hash>,
76 class Pred = std::equal_to<Key>,
79
80template <
81 class Key,
82 class Value,
83 class Hash = HardenedHash<strong_hash>,
84 class Pred = std::equal_to<Key>,
87
88template <
89 class Value,
90 class Hash = HardenedHash<strong_hash>,
91 class Pred = std::equal_to<Value>,
92 class Allocator = std::allocator<Value>>
94
95template <
96 class Value,
97 class Hash = HardenedHash<strong_hash>,
98 class Pred = std::equal_to<Value>,
99 class Allocator = std::allocator<Value>>
101
102} // namespace xrpl
Seed functor once per construction.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
beast::Xxhasher strong_hash
std::unordered_multiset< Value, Hash, Pred, Allocator > hardened_hash_multiset
std::unordered_set< Value, Hash, Pred, Allocator > hash_set
std::unordered_set< Value, Hash, Pred, Allocator > hardened_hash_set
std::unordered_multiset< Value, Hash, Pred, Allocator > hash_multiset
std::unordered_multimap< Key, Value, Hash, Pred, Allocator > hardened_hash_multimap
std::unordered_multimap< Key, Value, Hash, Pred, Allocator > hash_multimap
std::unordered_map< Key, Value, Hash, Pred, Allocator > hash_map
std::unordered_map< Key, Value, Hash, Pred, Allocator > hardened_hash_map
PartitionedUnorderedMap< Key, Value, Hash, Pred, Allocator > hardened_partitioned_hash_map