Skip to content

Commit

Permalink
- added tokyocabinet.h
Browse files Browse the repository at this point in the history
- changed privilege of Omnivore::Storage::_storage to protected from private
  • Loading branch information
kentaro committed May 15, 2009
1 parent 4044756 commit cc88555
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/luxio.h
Expand Up @@ -7,7 +7,6 @@
namespace Omnivore {
namespace Storage {
class LuxIO : public Omnivore::Storage::Base<Lux::IO::Btree *> {
Lux::IO::Btree *_storage;
public:
LuxIO () {};
~LuxIO () {};
Expand Down
1 change: 1 addition & 0 deletions src/storage.h
Expand Up @@ -12,6 +12,7 @@ namespace Omnivore {

template <class T>
class Base {
protected:
T _storage;

public:
Expand Down
25 changes: 25 additions & 0 deletions 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

0 comments on commit cc88555

Please sign in to comment.