libmoost
|
*** This class is NOT thread safe *** More...
#include <kvds_template.hpp>
Public Types | |
typedef void * | store_type |
Change this to whatever the correct type is (or remeove if unused) | |
Public Member Functions | |
KvdsTemplate () | |
Set store to null pointer for now, replace as appropriate. | |
~KvdsTemplate () | |
void | open (char const dsname[], bool newdb=false) |
void | save () |
void | close () |
store_type & | get_store () |
bool | put (void const *pkey, size_t const ksize, void const *pval, size_t const vsize) |
bool | get (void const *pkey, size_t const ksize, void *pval, size_t &vsize) |
bool | add (void const *pkey, size_t const ksize, void const *pval, size_t const vsize) |
bool | all (void const *pkey, size_t const ksize, void *pval, size_t &vsize) |
bool | xst (void const *pkey, size_t const ksize) |
bool | del (void const *pkey, size_t const ksize) |
bool | clr () |
bool | beg () |
bool | nxt (void *pkey, size_t &ksize) |
bool | end () |
bool | siz (void const *pkey, size_t const ksize, size_t &vsize) |
bool | cnt (boost::uint64_t &cnt) |
bool | nil (bool &isnil) |
Private Attributes | |
store_type | store_ |
std::string | dsname_ |
*** This class is NOT thread safe ***
Definition at line 41 of file kvds_template.hpp.
typedef void* moost::kvds::KvdsTemplate::store_type |
Change this to whatever the correct type is (or remeove if unused)
Definition at line 45 of file kvds_template.hpp.
moost::kvds::KvdsTemplate::KvdsTemplate | ( | ) | [inline] |
Set store to null pointer for now, replace as appropriate.
Definition at line 48 of file kvds_template.hpp.
moost::kvds::KvdsTemplate::~KvdsTemplate | ( | ) | [inline] |
bool moost::kvds::KvdsTemplate::add | ( | void const * | pkey, |
size_t const | ksize, | ||
void const * | pval, | ||
size_t const | vsize | ||
) | [inline] |
Definition at line 118 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::all | ( | void const * | pkey, |
size_t const | ksize, | ||
void * | pval, | ||
size_t & | vsize | ||
) | [inline] |
Definition at line 126 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::beg | ( | ) | [inline] |
Definition at line 154 of file kvds_template.hpp.
void moost::kvds::KvdsTemplate::close | ( | ) | [inline] |
Definition at line 80 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::clr | ( | ) | [inline] |
Definition at line 149 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::cnt | ( | boost::uint64_t & | cnt | ) | [inline] |
Definition at line 181 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::del | ( | void const * | pkey, |
size_t const | ksize | ||
) | [inline] |
Definition at line 141 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::end | ( | ) | [inline] |
Definition at line 167 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::get | ( | void const * | pkey, |
size_t const | ksize, | ||
void * | pval, | ||
size_t & | vsize | ||
) | [inline] |
Definition at line 110 of file kvds_template.hpp.
store_type& moost::kvds::KvdsTemplate::get_store | ( | ) | [inline] |
You can call this to get a refernce to the underlying store. Useful if you need to do post construction configuration. For example if using a google hash or spare map you need to specify the delete/erase keys
Definition at line 97 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::nil | ( | bool & | isnil | ) | [inline] |
Definition at line 186 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::nxt | ( | void * | pkey, |
size_t & | ksize | ||
) | [inline] |
Definition at line 159 of file kvds_template.hpp.
void moost::kvds::KvdsTemplate::open | ( | char const | dsname[], |
bool | newdb = false |
||
) | [inline] |
Definition at line 61 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::put | ( | void const * | pkey, |
size_t const | ksize, | ||
void const * | pval, | ||
size_t const | vsize | ||
) | [inline] |
Definition at line 102 of file kvds_template.hpp.
void moost::kvds::KvdsTemplate::save | ( | ) | [inline] |
bool moost::kvds::KvdsTemplate::siz | ( | void const * | pkey, |
size_t const | ksize, | ||
size_t & | vsize | ||
) | [inline] |
Definition at line 172 of file kvds_template.hpp.
bool moost::kvds::KvdsTemplate::xst | ( | void const * | pkey, |
size_t const | ksize | ||
) | [inline] |
Definition at line 134 of file kvds_template.hpp.
std::string moost::kvds::KvdsTemplate::dsname_ [private] |
Definition at line 194 of file kvds_template.hpp.
store_type moost::kvds::KvdsTemplate::store_ [private] |
Definition at line 193 of file kvds_template.hpp.