Interface of cursor to indicate a record. More...
#include <kcdb.h>
Public Member Functions | |
virtual | ~Cursor () |
Destructor. | |
bool | set_value (const char *vbuf, size_t vsiz, bool step=false) |
Set the value of the current record. | |
bool | set_value_str (const std::string &value, bool step=false) |
Set the value of the current record. | |
bool | remove () |
Remove the current record. | |
char * | get_key (size_t *sp, bool step=false) |
Get the key of the current record. | |
std::string * | get_key (bool step=false) |
Get the key of the current record. | |
char * | get_value (size_t *sp, bool step=false) |
Get the value of the current record. | |
std::string * | get_value (bool step=false) |
Get the value of the current record. | |
char * | get (size_t *ksp, const char **vbp, size_t *vsp, bool step=false) |
Get a pair of the key and the value of the current record. | |
std::pair< std::string, std::string > * | get_pair (bool step=false) |
Get a pair of the key and the value of the current record. | |
virtual BasicDB * | db ()=0 |
Get the database object. | |
Error | error () |
Get the last happened error. |
Interface of cursor to indicate a record.
virtual kyotocabinet::BasicDB::Cursor::~Cursor | ( | ) | [virtual] |
Destructor.
Reimplemented from kyotocabinet::DB::Cursor.
Reimplemented in kyotocabinet::CacheDB::Cursor, kyotocabinet::DirDB::Cursor, kyotocabinet::HashDB::Cursor, kyotocabinet::PlantDB< BASEDB, DBTYPE >::Cursor, kyotocabinet::PolyDB::Cursor, kyotocabinet::ProtoDB< STRMAP, DBTYPE >::Cursor, and kyotocabinet::StashDB::Cursor.
bool kyotocabinet::BasicDB::Cursor::set_value | ( | const char * | vbuf, | |
size_t | vsiz, | |||
bool | step = false | |||
) | [virtual] |
Set the value of the current record.
vbuf | the pointer to the value region. | |
vsiz | the size of the value region. | |
step | true to move the cursor to the next record, or false for no move. |
Implements kyotocabinet::DB::Cursor.
bool kyotocabinet::BasicDB::Cursor::set_value_str | ( | const std::string & | value, | |
bool | step = false | |||
) | [virtual] |
Set the value of the current record.
Implements kyotocabinet::DB::Cursor.
bool kyotocabinet::BasicDB::Cursor::remove | ( | ) | [virtual] |
Remove the current record.
Implements kyotocabinet::DB::Cursor.
char* kyotocabinet::BasicDB::Cursor::get_key | ( | size_t * | sp, | |
bool | step = false | |||
) | [virtual] |
Get the key of the current record.
sp | the pointer to the variable into which the size of the region of the return value is assigned. | |
step | true to move the cursor to the next record, or false for no move. |
Implements kyotocabinet::DB::Cursor.
std::string* kyotocabinet::BasicDB::Cursor::get_key | ( | bool | step = false |
) | [virtual] |
Get the key of the current record.
Implements kyotocabinet::DB::Cursor.
char* kyotocabinet::BasicDB::Cursor::get_value | ( | size_t * | sp, | |
bool | step = false | |||
) | [virtual] |
Get the value of the current record.
sp | the pointer to the variable into which the size of the region of the return value is assigned. | |
step | true to move the cursor to the next record, or false for no move. |
Implements kyotocabinet::DB::Cursor.
std::string* kyotocabinet::BasicDB::Cursor::get_value | ( | bool | step = false |
) | [virtual] |
Get the value of the current record.
Implements kyotocabinet::DB::Cursor.
char* kyotocabinet::BasicDB::Cursor::get | ( | size_t * | ksp, | |
const char ** | vbp, | |||
size_t * | vsp, | |||
bool | step = false | |||
) | [virtual] |
Get a pair of the key and the value of the current record.
ksp | the pointer to the variable into which the size of the region of the return value is assigned. | |
vbp | the pointer to the variable into which the pointer to the value region is assigned. | |
vsp | the pointer to the variable into which the size of the value region is assigned. | |
step | true to move the cursor to the next record, or false for no move. |
Implements kyotocabinet::DB::Cursor.
std::pair<std::string, std::string>* kyotocabinet::BasicDB::Cursor::get_pair | ( | bool | step = false |
) | [virtual] |
Get a pair of the key and the value of the current record.
Implements kyotocabinet::DB::Cursor.
virtual BasicDB* kyotocabinet::BasicDB::Cursor::db | ( | ) | [pure virtual] |
Get the database object.
Implements kyotocabinet::DB::Cursor.
Implemented in kyotocabinet::CacheDB::Cursor, kyotocabinet::DirDB::Cursor, kyotocabinet::HashDB::Cursor, kyotocabinet::PlantDB< BASEDB, DBTYPE >::Cursor, kyotocabinet::PolyDB::Cursor, kyotocabinet::ProtoDB< STRMAP, DBTYPE >::Cursor, and kyotocabinet::StashDB::Cursor.
Error kyotocabinet::BasicDB::Cursor::error | ( | ) |
Get the last happened error.