Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- added tokyocabinet.h

- changed privilege of Omnivore::Storage::_storage to protected from private
  • Loading branch information...
commit cc885558f9d4fc92ea0a2c66c12b32ce07d4653d 1 parent 4044756
@kentaro authored
Showing with 26 additions and 1 deletion.
  1. +0 −1  src/luxio.h
  2. +1 −0  src/storage.h
  3. +25 −0 src/tokyocabinet.h
View
1  src/luxio.h
@@ -7,7 +7,6 @@
namespace Omnivore {
namespace Storage {
class LuxIO : public Omnivore::Storage::Base<Lux::IO::Btree *> {
- Lux::IO::Btree *_storage;
public:
LuxIO () {};
~LuxIO () {};
View
1  src/storage.h
@@ -12,6 +12,7 @@ namespace Omnivore {
template <class T>
class Base {
+ protected:
T _storage;
public:
View
25 src/tokyocabinet.h
@@ -0,0 +1,25 @@
+#ifndef OMNIVORE_STORAGE_TOKYOCABINET_H
+#define OMNIVORE_STORAGE_TOKYOCABINET_H
+
+#include <tcadb.h>
+#include "storage.h"
+
+namespace Omnivore {
+ namespace Storage {
+ class TokyoCabinet : public Omnivore::Storage::Base<TCADB> {
+ public:
+ TokyoCabinet () {};
+ ~TokyoCabinet () {};
+
+ bool open (std::string name);
+ bool close ();
+ Omnivore::Storage::data_t *
+ get (const void *key, int key_size);
+ bool put (const void *key, int key_size, const void *value, int value_size);
+ bool del (const void *key, int key_size);
+ void free ();
+ };
+ }
+}
+
+#endif
Please sign in to comment.
Something went wrong with that request. Please try again.