Tkrzw
Public Member Functions | Friends | List of all members
tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator Class Referencefinal

Const iterator of records. More...

#include <tkrzw_containers.h>

Public Member Functions

 ConstIterator (const ConstIterator &rhs)
 Copy constructor. More...
 
const Recordoperator* () const
 Gets the reference to the current record. More...
 
const Recordoperator-> () const
 Accesses a member of the current record. More...
 
ConstIteratoroperator= (const ConstIterator &rhs)
 Assignment operator from the self type. More...
 
bool operator== (const ConstIterator &rhs) const
 Equality operator with the self type. More...
 
bool operator!= (const ConstIterator &rhs) const
 Non-equality operator with the self type. More...
 
ConstIteratoroperator++ ()
 Preposting increment operator. More...
 
ConstIterator operator++ (int)
 Postpositive increment operator. More...
 
ConstIteratoroperator-- ()
 Preposting decrement operator. More...
 
ConstIterator operator-- (int)
 Postpositive decrement operator. More...
 

Friends

class LinkedHashMap
 

Detailed Description

template<typename KEYTYPE, typename VALUETYPE, typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
class tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator

Const iterator of records.

The iterator is invalidated when the current record is removed.

Constructor & Destructor Documentation

◆ ConstIterator()

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::ConstIterator ( const ConstIterator rhs)

Copy constructor.

Parameters
rhsThe right-hand-side object.

Member Function Documentation

◆ operator*()

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
const Record& tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator* ( ) const

Gets the reference to the current record.

Returns
The reference to the current record.

◆ operator->()

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
const Record* tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator-> ( ) const

Accesses a member of the current record.

Returns
The pointer to the current record.

◆ operator=()

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
ConstIterator& tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator= ( const ConstIterator rhs)

Assignment operator from the self type.

Parameters
rhsThe right-hand-side object.
Returns
The reference to itself.

◆ operator==()

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
bool tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator== ( const ConstIterator rhs) const

Equality operator with the self type.

Parameters
rhsThe right-hand-side object.
Returns
True if the both are equal, or false if not.

◆ operator!=()

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
bool tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator!= ( const ConstIterator rhs) const

Non-equality operator with the self type.

Parameters
rhsThe right-hand-side object.
Returns
False if the both are equal, or true if not.

◆ operator++() [1/2]

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
ConstIterator& tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator++ ( )

Preposting increment operator.

Returns
The iterator itself.

◆ operator++() [2/2]

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
ConstIterator tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator++ ( int  )

Postpositive increment operator.

Returns
An iterator of the old position.

◆ operator--() [1/2]

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
ConstIterator& tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator-- ( )

Preposting decrement operator.

Returns
The iterator itself.

◆ operator--() [2/2]

template<typename KEYTYPE , typename VALUETYPE , typename HASHTYPE = std::hash<KEYTYPE>, typename EQUALTOTYPE = std::equal_to<KEYTYPE>>
ConstIterator tkrzw::LinkedHashMap< KEYTYPE, VALUETYPE, HASHTYPE, EQUALTOTYPE >::ConstIterator::operator-- ( int  )

Postpositive decrement operator.

Returns
An iterator of the old position.