Kyoto Tycoon
Public Member Functions | Static Public Attributes
kyototycoon::TimedDB::Visitor Class Reference

Interface to access a record. More...

#include <kttimeddb.h>

List of all members.

Public Member Functions

virtual ~Visitor ()
 Destructor.
virtual const char * visit_full (const char *kbuf, size_t ksiz, const char *vbuf, size_t vsiz, size_t *sp, int64_t *xtp)
 Visit a record.
virtual const char * visit_empty (const char *kbuf, size_t ksiz, size_t *sp, int64_t *xtp)
 Visit a empty record space.
virtual void visit_before ()
 Preprocess the main operations.
virtual void visit_after ()
 Postprocess the main operations.

Static Public Attributes

static const char *const NOP
 Special pointer for no operation.
static const char *const REMOVE
 Special pointer to remove the record.

Detailed Description

Interface to access a record.


Constructor & Destructor Documentation

Destructor.


Member Function Documentation

virtual const char* kyototycoon::TimedDB::Visitor::visit_full ( const char *  kbuf,
size_t  ksiz,
const char *  vbuf,
size_t  vsiz,
size_t *  sp,
int64_t *  xtp 
) [virtual]

Visit a record.

Parameters:
kbufthe pointer to the key region.
ksizthe size of the key region.
vbufthe pointer to the value region.
vsizthe size of the value region.
spthe pointer to the variable into which the size of the region of the return value is assigned.
xtpthe pointer to the variable into which the expiration time from now in seconds is assigned. The initial value is the absolute expiration time.
Returns:
If it is the pointer to a region, the value is replaced by the content. If it is Visitor::NOP, nothing is modified. If it is Visitor::REMOVE, the record is removed.
virtual const char* kyototycoon::TimedDB::Visitor::visit_empty ( const char *  kbuf,
size_t  ksiz,
size_t *  sp,
int64_t *  xtp 
) [virtual]

Visit a empty record space.

Parameters:
kbufthe pointer to the key region.
ksizthe size of the key region.
spthe pointer to the variable into which the size of the region of the return value is assigned.
xtpthe pointer to the variable into which the expiration time from now in seconds is assigned.
Returns:
If it is the pointer to a region, the value is replaced by the content. If it is Visitor::NOP or Visitor::REMOVE, nothing is modified.
virtual void kyototycoon::TimedDB::Visitor::visit_before ( ) [virtual]

Preprocess the main operations.

virtual void kyototycoon::TimedDB::Visitor::visit_after ( ) [virtual]

Postprocess the main operations.


Member Data Documentation

const char* const kyototycoon::TimedDB::Visitor::NOP [static]

Special pointer for no operation.

const char* const kyototycoon::TimedDB::Visitor::REMOVE [static]

Special pointer to remove the record.