Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- changed privilege of Omnivore::Storage::_storage to protected from private
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ namespace Omnivore { | |
|
||
template <class T> | ||
class Base { | ||
protected: | ||
T _storage; | ||
|
||
public: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |