Navigation Menu

Skip to content

Commit

Permalink
Implement grnxx::map::HashTable.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yata committed Jun 4, 2013
1 parent 29205e2 commit 6e20323
Show file tree
Hide file tree
Showing 15 changed files with 1,265 additions and 54 deletions.
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -66,6 +66,7 @@ AC_CONFIG_FILES([Makefile
lib/grnxx/db/Makefile
lib/grnxx/io/Makefile
lib/grnxx/map/Makefile
lib/grnxx/map/hash_table/Makefile
lib/grnxx/storage/Makefile
src/Makefile
test/Makefile])
Expand Down
5 changes: 3 additions & 2 deletions lib/grnxx/map.cpp
Expand Up @@ -26,6 +26,7 @@
#include "grnxx/string_builder.hpp"
#include "grnxx/map/array_map.hpp"
#include "grnxx/map/cursor_impl.hpp"
#include "grnxx/map/hash_table.hpp"
#include "grnxx/map/header.hpp"
#include "grnxx/map/helper.hpp"
#include "grnxx/map/scanner_impl.hpp"
Expand Down Expand Up @@ -78,7 +79,7 @@ Map<T> *Map<T>::create(MapType type, Storage *storage,
// TODO: Not supported yet.
}
case MAP_HASH_TABLE: {
// TODO: Not supported yet.
return map::HashTable<T>::create(storage, storage_node_id, options);
}
default: {
GRNXX_ERROR() << "invalid argument: type = " << type;
Expand Down Expand Up @@ -110,7 +111,7 @@ Map<T> *Map<T>::open(Storage *storage, uint32_t storage_node_id) {
// TODO: Not supported yet.
}
case MAP_HASH_TABLE: {
// TODO: Not supported yet.
return map::HashTable<T>::open(storage, storage_node_id);
}
default: {
GRNXX_ERROR() << "invalid format: type = " << header->type;
Expand Down
1 change: 0 additions & 1 deletion lib/grnxx/map.hpp
Expand Up @@ -20,7 +20,6 @@

#include "grnxx/features.hpp"

#include "grnxx/flags_impl.hpp"
#include "grnxx/map_cursor.hpp"
#include "grnxx/map_cursor_query.hpp"
#include "grnxx/map_scanner.hpp"
Expand Down
33 changes: 20 additions & 13 deletions lib/grnxx/map/Makefile.am
@@ -1,21 +1,28 @@
SUBDIRS = \
hash_table

noinst_LTLIBRARIES = libgrnxx_map.la

libgrnxx_map_la_LIBADD = \
hash_table/libgrnxx_map_hash_table.la

libgrnxx_map_la_LDFLAGS = @AM_LTLDFLAGS@

libgrnxx_map_la_SOURCES = \
array_map.cpp \
bytes_array.cpp \
bytes_store.cpp \
cursor_impl.cpp \
libgrnxx_map_la_SOURCES = \
array_map.cpp \
bytes_array.cpp \
bytes_store.cpp \
cursor_impl.cpp \
hash_table.cpp \
scanner_impl.cpp

libgrnxx_map_includedir = ${includedir}/grnxx/map
libgrnxx_map_include_HEADERS = \
array_map.hpp \
bytes_array.hpp \
bytes_store.hpp \
cursor_impl.hpp \
hash.hpp \
header.hpp \
helper.hpp \
libgrnxx_map_include_HEADERS = \
array_map.hpp \
bytes_array.hpp \
bytes_store.hpp \
cursor_impl.hpp \
hash_table.hpp \
header.hpp \
helper.hpp \
scanner_impl.hpp

0 comments on commit 6e20323

Please sign in to comment.