Tkrzw
|
Interface of processor for a record. More...
#include <tkrzw_dbm.h>
Public Member Functions | |
virtual | ~RecordProcessor ()=default |
Destructor. More... | |
virtual std::string_view | ProcessFull (std::string_view key, std::string_view value) |
Processes an existing record. More... | |
virtual std::string_view | ProcessEmpty (std::string_view key) |
Processes an empty record space. More... | |
Static Public Attributes | |
static const std::string_view | NOOP |
The special string indicating no operation. More... | |
static const std::string_view | REMOVE |
The special string indicating removing operation. More... | |
Interface of processor for a record.
|
virtualdefault |
Destructor.
Reimplemented in tkrzw::AsyncDBM::RecordProcessor.
|
virtual |
Processes an existing record.
key | The key of the existing record. |
value | The value of the existing record. |
The memory referred to by the return value must be alive until the end of the life-span of this object or until this function is called next time.
Reimplemented in tkrzw::DBM::RecordProcessorIterator, tkrzw::DBM::RecordProcessorExport, tkrzw::DBM::RecordProcessorPopFirst, tkrzw::DBM::RecordSetterRekey, tkrzw::DBM::RecordRemoverRekey, tkrzw::DBM::RecordCheckerRekey, tkrzw::DBM::RecordSetterCompareExchangeMulti, tkrzw::DBM::RecordCheckerCompareExchangeMulti, tkrzw::DBM::RecordProcessorIncrement, tkrzw::DBM::RecordProcessorCompareExchange, tkrzw::DBM::RecordProcessorAppend, tkrzw::DBM::RecordProcessorRemove, tkrzw::DBM::RecordProcessorSet, tkrzw::DBM::RecordProcessorGet, and tkrzw::DBM::RecordProcessorLambda.
|
virtual |
Processes an empty record space.
key | The key specified by the caller. |
The memory referred to by the return value must be alive until the end of the life-span of this object or until this function is called next time.
Reimplemented in tkrzw::DBM::RecordSetterRekey, tkrzw::DBM::RecordRemoverRekey, tkrzw::DBM::RecordCheckerRekey, tkrzw::DBM::RecordSetterCompareExchangeMulti, tkrzw::DBM::RecordCheckerCompareExchangeMulti, tkrzw::DBM::RecordProcessorIncrement, tkrzw::DBM::RecordProcessorCompareExchange, tkrzw::DBM::RecordProcessorAppend, tkrzw::DBM::RecordProcessorRemove, tkrzw::DBM::RecordProcessorSet, tkrzw::DBM::RecordProcessorGet, and tkrzw::DBM::RecordProcessorLambda.
|
static |
The special string indicating no operation.
The uniqueness comes from the address of the data region. So, checking should be done like your_value.data() == NOOP.data().
|
static |
The special string indicating removing operation.
The uniqueness comes from the address of the data region. So, checking should be done like your_value.data() == REMOVE.data().