diff --git a/src/luxio.h b/src/luxio.h index d25706f..8ab5191 100644 --- a/src/luxio.h +++ b/src/luxio.h @@ -7,7 +7,6 @@ namespace Omnivore { namespace Storage { class LuxIO : public Omnivore::Storage::Base { - Lux::IO::Btree *_storage; public: LuxIO () {}; ~LuxIO () {}; diff --git a/src/storage.h b/src/storage.h index 558c2a2..70bdb7b 100644 --- a/src/storage.h +++ b/src/storage.h @@ -12,6 +12,7 @@ namespace Omnivore { template class Base { + protected: T _storage; public: diff --git a/src/tokyocabinet.h b/src/tokyocabinet.h new file mode 100644 index 0000000..821955a --- /dev/null +++ b/src/tokyocabinet.h @@ -0,0 +1,25 @@ +#ifndef OMNIVORE_STORAGE_TOKYOCABINET_H +#define OMNIVORE_STORAGE_TOKYOCABINET_H + +#include +#include "storage.h" + +namespace Omnivore { + namespace Storage { + class TokyoCabinet : public Omnivore::Storage::Base { + 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