Iterator for each record.
More...
#include <tkrzw_index.h>
|
| ~Iterator () |
| Destructor.
|
|
| Iterator (const Iterator &rhs)=delete |
| Copy and assignment are disabled.
|
|
Iterator & | operator= (const Iterator &rhs)=delete |
|
void | First () |
| Initializes the iterator to indicate the first record.
|
|
void | Last () |
| Initializes the iterator to indicate the last record.
|
|
void | Jump (std::string_view key, std::string_view value="") |
| Initializes the iterator to indicate a specific range.
|
|
void | Next () |
| Moves the iterator to the next record.
|
|
void | Previous () |
| Moves the iterator to the previous record.
|
|
bool | Get (std::string *key=nullptr, std::string *value=nullptr) |
| Gets the key and the value of the current record of the iterator.
|
|
Iterator for each record.
◆ ~Iterator()
tkrzw::MemIndex::Iterator::~Iterator |
( |
| ) |
|
◆ Iterator()
tkrzw::MemIndex::Iterator::Iterator |
( |
const Iterator & | rhs | ) |
|
|
explicitdelete |
Copy and assignment are disabled.
◆ First()
void tkrzw::MemIndex::Iterator::First |
( |
| ) |
|
Initializes the iterator to indicate the first record.
◆ Last()
void tkrzw::MemIndex::Iterator::Last |
( |
| ) |
|
Initializes the iterator to indicate the last record.
◆ Jump()
void tkrzw::MemIndex::Iterator::Jump |
( |
std::string_view | key, |
|
|
std::string_view | value = "" ) |
Initializes the iterator to indicate a specific range.
- Parameters
-
key | The key of the lower bound. |
value | The value of the lower bound. |
◆ Next()
void tkrzw::MemIndex::Iterator::Next |
( |
| ) |
|
Moves the iterator to the next record.
◆ Previous()
void tkrzw::MemIndex::Iterator::Previous |
( |
| ) |
|
Moves the iterator to the previous record.
◆ Get()
bool tkrzw::MemIndex::Iterator::Get |
( |
std::string * | key = nullptr, |
|
|
std::string * | value = nullptr ) |
Gets the key and the value of the current record of the iterator.
- Parameters
-
key | The pointer to a string object to contain the record key. If it is nullptr, the key data is ignored. |
value | The pointer to a string object to contain the record value. If it is nullptr, the value data is ignored. |
- Returns
- True on success or false on failure. If theres no record to fetch, false is returned.