Tkrzw
|
Iterator for each record. More...
#include <tkrzw_index.h>
Public Member Functions | |
~Iterator () | |
Destructor. More... | |
Iterator (const Iterator &rhs)=delete | |
Copy and assignment are disabled. More... | |
Iterator & | operator= (const Iterator &rhs)=delete |
void | First () |
Initializes the iterator to indicate the first record. More... | |
void | Last () |
Initializes the iterator to indicate the last record. More... | |
void | Jump (const KEYTYPE &key, const VALUETYPE &value=VALUETYPE()) |
Initializes the iterator to indicate a specific range. More... | |
bool | Get (KEYTYPE *key=nullptr, VALUETYPE *value=nullptr) |
Gets the key and the value of the current record of the iterator. More... | |
void | Next () |
Moves the iterator to the next record. More... | |
void | Previous () |
Moves the iterator to the previous record. More... | |
Friends | |
class | tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE > |
Iterator for each record.
tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator::~Iterator |
Destructor.
|
explicitdelete |
Copy and assignment are disabled.
void tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator::First |
Initializes the iterator to indicate the first record.
void tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator::Last |
Initializes the iterator to indicate the last record.
void tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator::Jump | ( | const KEYTYPE & | key, |
const VALUETYPE & | value = VALUETYPE() |
||
) |
Initializes the iterator to indicate a specific range.
key | The key of the lower bound. |
value | The value of the lower bound. If you set std::greater<std::pair<KEYTYPE, VALUETYPE>> as the comparator, values are also set in descending order. Then, in order to visit all record of the specified key, you should set the maximum value in the possible range. |
bool tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator::Get | ( | KEYTYPE * | key = nullptr , |
VALUETYPE * | value = nullptr |
||
) |
Gets the key and the value of the current record of the iterator.
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. |
void tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator::Next |
Moves the iterator to the next record.
void tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator::Previous |
Moves the iterator to the previous record.