Skip to content

Commit 8f61a1f

Browse files
committed
Rename hashmap2 to arraymap.
1 parent d98d1cb commit 8f61a1f

File tree

12 files changed

+98
-100
lines changed

12 files changed

+98
-100
lines changed

Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ test_libbitcoin_database_test_SOURCES = \
7676
test/mocks/chunk_storage.hpp \
7777
test/mocks/chunk_store.hpp \
7878
test/mocks/map_store.hpp \
79+
test/primitives/arraymap.cpp \
7980
test/primitives/hashmap.cpp \
80-
test/primitives/hashmap2.cpp \
8181
test/primitives/head.cpp \
8282
test/primitives/head2.cpp \
8383
test/primitives/iterator.cpp \
@@ -159,8 +159,8 @@ include_bitcoin_database_impl_memory_HEADERS = \
159159

160160
include_bitcoin_database_impl_primitivesdir = ${includedir}/bitcoin/database/impl/primitives
161161
include_bitcoin_database_impl_primitives_HEADERS = \
162+
include/bitcoin/database/impl/primitives/arraymap.ipp \
162163
include/bitcoin/database/impl/primitives/hashmap.ipp \
163-
include/bitcoin/database/impl/primitives/hashmap2.ipp \
164164
include/bitcoin/database/impl/primitives/head.ipp \
165165
include/bitcoin/database/impl/primitives/head2.ipp \
166166
include/bitcoin/database/impl/primitives/iterator.ipp \
@@ -206,8 +206,8 @@ include_bitcoin_database_memory_interfaces_HEADERS = \
206206

207207
include_bitcoin_database_primitivesdir = ${includedir}/bitcoin/database/primitives
208208
include_bitcoin_database_primitives_HEADERS = \
209+
include/bitcoin/database/primitives/arraymap.hpp \
209210
include/bitcoin/database/primitives/hashmap.hpp \
210-
include/bitcoin/database/primitives/hashmap2.hpp \
211211
include/bitcoin/database/primitives/head.hpp \
212212
include/bitcoin/database/primitives/head2.hpp \
213213
include/bitcoin/database/primitives/iterator.hpp \

builds/cmake/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ if (with-tests)
284284
"../../test/mocks/chunk_storage.hpp"
285285
"../../test/mocks/chunk_store.hpp"
286286
"../../test/mocks/map_store.hpp"
287+
"../../test/primitives/arraymap.cpp"
287288
"../../test/primitives/hashmap.cpp"
288-
"../../test/primitives/hashmap2.cpp"
289289
"../../test/primitives/head.cpp"
290290
"../../test/primitives/head2.cpp"
291291
"../../test/primitives/iterator.cpp"

builds/msvc/vs2022/libbitcoin-database-test/libbitcoin-database-test.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
<ObjectFileName>$(IntDir)test_memory_utilities.obj</ObjectFileName>
8686
</ClCompile>
8787
<ClCompile Include="..\..\..\..\test\mocks\chunk_storage.cpp" />
88+
<ClCompile Include="..\..\..\..\test\primitives\arraymap.cpp" />
8889
<ClCompile Include="..\..\..\..\test\primitives\hashmap.cpp" />
89-
<ClCompile Include="..\..\..\..\test\primitives\hashmap2.cpp" />
9090
<ClCompile Include="..\..\..\..\test\primitives\head.cpp" />
9191
<ClCompile Include="..\..\..\..\test\primitives\head2.cpp" />
9292
<ClCompile Include="..\..\..\..\test\primitives\iterator.cpp" />

builds/msvc/vs2022/libbitcoin-database-test/libbitcoin-database-test.vcxproj.filters

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@
7878
<ClCompile Include="..\..\..\..\test\mocks\chunk_storage.cpp">
7979
<Filter>src\mocks</Filter>
8080
</ClCompile>
81-
<ClCompile Include="..\..\..\..\test\primitives\hashmap.cpp">
81+
<ClCompile Include="..\..\..\..\test\primitives\arraymap.cpp">
8282
<Filter>src\primitives</Filter>
8383
</ClCompile>
84-
<ClCompile Include="..\..\..\..\test\primitives\hashmap2.cpp">
84+
<ClCompile Include="..\..\..\..\test\primitives\hashmap.cpp">
8585
<Filter>src\primitives</Filter>
8686
</ClCompile>
8787
<ClCompile Include="..\..\..\..\test\primitives\head.cpp">

builds/msvc/vs2022/libbitcoin-database/libbitcoin-database.vcxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@
113113
<ClInclude Include="..\..\..\..\include\bitcoin\database\memory\simple_writer.hpp" />
114114
<ClInclude Include="..\..\..\..\include\bitcoin\database\memory\streamers.hpp" />
115115
<ClInclude Include="..\..\..\..\include\bitcoin\database\memory\utilities.hpp" />
116+
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\arraymap.hpp" />
116117
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\hashmap.hpp" />
117-
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\hashmap2.hpp" />
118118
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\head.hpp" />
119119
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\head2.hpp" />
120120
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\iterator.hpp" />
@@ -153,8 +153,8 @@
153153
<None Include="..\..\..\..\include\bitcoin\database\impl\memory\accessor.ipp" />
154154
<None Include="..\..\..\..\include\bitcoin\database\impl\memory\simple_reader.ipp" />
155155
<None Include="..\..\..\..\include\bitcoin\database\impl\memory\simple_writer.ipp" />
156+
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\arraymap.ipp" />
156157
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\hashmap.ipp" />
157-
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\hashmap2.ipp" />
158158
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\head.ipp" />
159159
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\head2.ipp" />
160160
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\iterator.ipp" />

builds/msvc/vs2022/libbitcoin-database/libbitcoin-database.vcxproj.filters

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,10 @@
182182
<ClInclude Include="..\..\..\..\include\bitcoin\database\memory\utilities.hpp">
183183
<Filter>include\bitcoin\database\memory</Filter>
184184
</ClInclude>
185-
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\hashmap.hpp">
185+
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\arraymap.hpp">
186186
<Filter>include\bitcoin\database\primitives</Filter>
187187
</ClInclude>
188-
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\hashmap2.hpp">
188+
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\hashmap.hpp">
189189
<Filter>include\bitcoin\database\primitives</Filter>
190190
</ClInclude>
191191
<ClInclude Include="..\..\..\..\include\bitcoin\database\primitives\head.hpp">
@@ -298,10 +298,10 @@
298298
<None Include="..\..\..\..\include\bitcoin\database\impl\memory\simple_writer.ipp">
299299
<Filter>include\bitcoin\database\impl\memory</Filter>
300300
</None>
301-
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\hashmap.ipp">
301+
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\arraymap.ipp">
302302
<Filter>include\bitcoin\database\impl\primitives</Filter>
303303
</None>
304-
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\hashmap2.ipp">
304+
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\hashmap.ipp">
305305
<Filter>include\bitcoin\database\impl\primitives</Filter>
306306
</None>
307307
<None Include="..\..\..\..\include\bitcoin\database\impl\primitives\head.ipp">

include/bitcoin/database.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
#include <bitcoin/database/memory/utilities.hpp>
4343
#include <bitcoin/database/memory/interfaces/memory.hpp>
4444
#include <bitcoin/database/memory/interfaces/storage.hpp>
45+
#include <bitcoin/database/primitives/arraymap.hpp>
4546
#include <bitcoin/database/primitives/hashmap.hpp>
46-
#include <bitcoin/database/primitives/hashmap2.hpp>
4747
#include <bitcoin/database/primitives/head.hpp>
4848
#include <bitcoin/database/primitives/head2.hpp>
4949
#include <bitcoin/database/primitives/iterator.hpp>

include/bitcoin/database/impl/primitives/hashmap2.ipp renamed to include/bitcoin/database/impl/primitives/arraymap.ipp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
* You should have received a copy of the GNU Affero General Public License
1717
* along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
19-
#ifndef LIBBITCOIN_DATABASE_PRIMITIVES_HASHMAP2_IPP
20-
#define LIBBITCOIN_DATABASE_PRIMITIVES_HASHMAP2_IPP
19+
#ifndef LIBBITCOIN_DATABASE_PRIMITIVES_ARRAYMAP_IPP
20+
#define LIBBITCOIN_DATABASE_PRIMITIVES_ARRAYMAP_IPP
2121

2222
#include <algorithm>
2323
#include <bitcoin/system.hpp>
@@ -27,7 +27,7 @@ namespace libbitcoin {
2727
namespace database {
2828

2929
TEMPLATE
30-
CLASS::hashmap2(storage& header, storage& body, const Link& buckets) NOEXCEPT
30+
CLASS::arraymap(storage& header, storage& body, const Link& buckets) NOEXCEPT
3131
: head_(header, buckets), manager_(body)
3232
{
3333
}

include/bitcoin/database/primitives/hashmap2.hpp renamed to include/bitcoin/database/primitives/arraymap.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
/// You should have received a copy of the GNU Affero General Public License
1717
/// along with this program. If not, see <http://www.gnu.org/licenses/>.
1818
*/
19-
#ifndef LIBBITCOIN_DATABASE_PRIMITIVES_HASHMAP2_HPP
20-
#define LIBBITCOIN_DATABASE_PRIMITIVES_HASHMAP2_HPP
19+
#ifndef LIBBITCOIN_DATABASE_PRIMITIVES_ARRAYMAP_HPP
20+
#define LIBBITCOIN_DATABASE_PRIMITIVES_ARRAYMAP_HPP
2121

2222
#include <bitcoin/system.hpp>
2323
#include <bitcoin/database/define.hpp>
@@ -36,16 +36,16 @@ namespace database {
3636
/// the extent the record/slab size is known (limit can always be removed).
3737
/// Streams are always initialized from first element byte up to file limit.
3838
template <typename Link, typename Key, size_t Size>
39-
class hashmap2
39+
class arraymap
4040
{
4141
public:
42-
DEFAULT_COPY_MOVE_DESTRUCT(hashmap2);
42+
DEFAULT_COPY_MOVE_DESTRUCT(arraymap);
4343

4444
using key = Key;
4545
using link = Link;
4646
using iterator = database::iterator<Link, Key, Size>;
4747

48-
hashmap2(storage& header, storage& body, const Link& buckets) NOEXCEPT;
48+
arraymap(storage& header, storage& body, const Link& buckets) NOEXCEPT;
4949

5050
/// Setup, not thread safe.
5151
/// -----------------------------------------------------------------------
@@ -132,16 +132,16 @@ class hashmap2
132132
};
133133

134134
template <typename Element>
135-
using hash_map2 = hashmap2<linkage<Element::pk>, system::data_array<Element::sk>,
135+
using array_map = arraymap<linkage<Element::pk>, system::data_array<Element::sk>,
136136
Element::size>;
137137

138138
} // namespace database
139139
} // namespace libbitcoin
140140

141141
#define TEMPLATE template <typename Link, typename Key, size_t Size>
142-
#define CLASS hashmap2<Link, Key, Size>
142+
#define CLASS arraymap<Link, Key, Size>
143143

144-
#include <bitcoin/database/impl/primitives/hashmap2.ipp>
144+
#include <bitcoin/database/impl/primitives/arraymap.ipp>
145145

146146
#undef CLASS
147147
#undef TEMPLATE

include/bitcoin/database/primitives/primitives.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include <bitcoin/database/primitives/nomap.hpp>
2323
#include <bitcoin/database/primitives/hashmap.hpp>
24-
#include <bitcoin/database/primitives/hashmap2.hpp>
24+
#include <bitcoin/database/primitives/arraymap.hpp>
2525
#include <bitcoin/database/primitives/head.hpp>
2626
#include <bitcoin/database/primitives/head2.hpp>
2727
#include <bitcoin/database/primitives/iterator.hpp>

0 commit comments

Comments
 (0)