rippled
Loading...
Searching...
No Matches
UnorderedContainers.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#ifndef RIPPLE_BASICS_UNORDEREDCONTAINERS_H_INCLUDED
21#define RIPPLE_BASICS_UNORDEREDCONTAINERS_H_INCLUDED
22
23#include <xrpl/basics/hardened_hash.h>
24#include <xrpl/basics/partitioned_unordered_map.h>
25#include <xrpl/beast/hash/hash_append.h>
26#include <xrpl/beast/hash/uhash.h>
27#include <xrpl/beast/hash/xxhasher.h>
28#include <unordered_map>
29#include <unordered_set>
30
43namespace ripple {
44
45// hash containers
46
47template <
48 class Key,
49 class Value,
50 class Hash = beast::uhash<>,
51 class Pred = std::equal_to<Key>,
54
55template <
56 class Key,
57 class Value,
58 class Hash = beast::uhash<>,
59 class Pred = std::equal_to<Key>,
63
64template <
65 class Value,
66 class Hash = beast::uhash<>,
67 class Pred = std::equal_to<Value>,
68 class Allocator = std::allocator<Value>>
70
71template <
72 class Value,
73 class Hash = beast::uhash<>,
74 class Pred = std::equal_to<Value>,
75 class Allocator = std::allocator<Value>>
77
78// hardened_hash containers
79
81
82template <
83 class Key,
84 class Value,
85 class Hash = hardened_hash<strong_hash>,
86 class Pred = std::equal_to<Key>,
89
90template <
91 class Key,
92 class Value,
93 class Hash = hardened_hash<strong_hash>,
94 class Pred = std::equal_to<Key>,
98
99template <
100 class Key,
101 class Value,
102 class Hash = hardened_hash<strong_hash>,
103 class Pred = std::equal_to<Key>,
107
108template <
109 class Value,
110 class Hash = hardened_hash<strong_hash>,
111 class Pred = std::equal_to<Value>,
112 class Allocator = std::allocator<Value>>
114
115template <
116 class Value,
117 class Hash = hardened_hash<strong_hash>,
118 class Pred = std::equal_to<Value>,
119 class Allocator = std::allocator<Value>>
122
123} // namespace ripple
124
125#endif
Seed functor once per construction.
Definition: hardened_hash.h:97
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26