Tkrzw
Public Member Functions | Friends | List of all members
tkrzw::DoubleLRUCache< VALUETYPE >::Iterator Class Referencefinal

Iterator to access each record. More...

#include <tkrzw_containers.h>

Public Member Functions

std::shared_ptr< VALUETYPE > Get (int64_t *id)
 Get the value of the current record. More...
 
void Next ()
 Moves the iterator to the next record. More...
 

Friends

class DoubleLRUCache< VALUETYPE >
 

Detailed Description

template<class VALUETYPE>
class tkrzw::DoubleLRUCache< VALUETYPE >::Iterator

Iterator to access each record.

The iterator is invalidated when the current record is removed.

Member Function Documentation

◆ Get()

template<typename VALUETYPE >
std::shared_ptr< VALUETYPE > tkrzw::DoubleLRUCache< VALUETYPE >::Iterator::Get ( int64_t *  id)

Get the value of the current record.

Parameters
idThe pointer to store the ID of the record. If it is nullptr, it is ignored.
Returns
A shared pointer to the value object. It points to nullptr on failure.

◆ Next()

template<typename VALUETYPE >
void tkrzw::DoubleLRUCache< VALUETYPE >::Iterator::Next

Moves the iterator to the next record.