kyotocabinet::CacheDB::Cursor Class Reference

Cursor to indicate a record. More...

#include <kccachedb.h>

List of all members.

Public Member Functions

 Cursor (CacheDB *db)
 Constructor.
virtual ~Cursor ()
 Destructor.
virtual bool accept (Visitor *visitor, bool writable=true, bool step=false)
 Accept a visitor to the current record.
virtual bool jump ()
 Jump the cursor to the first record.
virtual bool jump (const char *kbuf, size_t ksiz)
 Jump the cursor onto a record.
virtual bool jump (const std::string &key)
 Jump the cursor to a record.
virtual bool step ()
 Step the cursor to the next record.
virtual CacheDBdb ()
 Get the database object.

Friends

class CacheDB

Detailed Description

Cursor to indicate a record.


Constructor & Destructor Documentation

kyotocabinet::CacheDB::Cursor::Cursor ( CacheDB db  )  [explicit]

Constructor.

Parameters:
db the container database object.
virtual kyotocabinet::CacheDB::Cursor::~Cursor (  )  [virtual]

Destructor.

Reimplemented from kyotocabinet::FileDB::Cursor.


Member Function Documentation

virtual bool kyotocabinet::CacheDB::Cursor::accept ( Visitor visitor,
bool  writable = true,
bool  step = false 
) [virtual]

Accept a visitor to the current record.

Parameters:
visitor a visitor object.
writable true for writable operation, or false for read-only operation.
step true to move the cursor to the next record, or false for no move.
Returns:
true on success, or false on failure.
Note:
the operation for each record is performed atomically and other threads accessing the same record are blocked.

Implements kyotocabinet::DB::Cursor.

virtual bool kyotocabinet::CacheDB::Cursor::jump (  )  [virtual]

Jump the cursor to the first record.

Returns:
true on success, or false on failure.

Implements kyotocabinet::DB::Cursor.

virtual bool kyotocabinet::CacheDB::Cursor::jump ( const char *  kbuf,
size_t  ksiz 
) [virtual]

Jump the cursor onto a record.

Parameters:
kbuf the pointer to the key region.
ksiz the size of the key region.
Returns:
true on success, or false on failure.

Implements kyotocabinet::DB::Cursor.

virtual bool kyotocabinet::CacheDB::Cursor::jump ( const std::string &  key  )  [virtual]

Jump the cursor to a record.

Note:
Equal to the original Cursor::jump method except that the parameter is std::string.

Implements kyotocabinet::DB::Cursor.

virtual bool kyotocabinet::CacheDB::Cursor::step (  )  [virtual]

Step the cursor to the next record.

Returns:
true on success, or false on failure.

Implements kyotocabinet::DB::Cursor.

virtual CacheDB* kyotocabinet::CacheDB::Cursor::db (  )  [virtual]

Get the database object.

Returns:
the database object.

Implements kyotocabinet::FileDB::Cursor.

Generated on Tue May 4 10:08:02 2010 for Kyoto Cabinet by  doxygen 1.6.3