|
| ~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...
|
|
void | Next () |
| Moves the iterator to the next record. More...
|
|
void | Previous () |
| Moves the iterator to the previous record. More...
|
|
bool | Get (KEYTYPE *key=nullptr, VALUETYPE *value=nullptr) |
| Gets the key and the value of the current record of the iterator. More...
|
|
template<typename KEYTYPE, typename VALUETYPE, typename CMPTYPE = std::less<std::pair<KEYTYPE, VALUETYPE>>>
class tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator
Iterator for each record.
template<typename KEYTYPE , typename VALUETYPE , typename CMPTYPE >
void tkrzw::StdIndex< KEYTYPE, VALUETYPE, CMPTYPE >::Iterator::Jump |
( |
const KEYTYPE & |
key, |
|
|
const VALUETYPE & |
value = VALUETYPE() |
|
) |
| |
Initializes the iterator to indicate a specific range.
- Parameters
-
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.