CppCommon  1.0.4.1
C++ Common Library
Public Types | Public Member Functions | Friends | List of all members
CppCommon::HashMapIterator< TContainer, TKey, TValue > Class Template Reference

Hash map iterator. More...

#include <hashmap.h>

Public Types

typedef std::pair< TKey, TValue > value_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef ptrdiff_t difference_type
 
typedef size_t size_type
 
typedef std::bidirectional_iterator_tag iterator_category
 

Public Member Functions

 HashMapIterator () noexcept
 
 HashMapIterator (TContainer *container) noexcept
 
 HashMapIterator (TContainer *container, size_t index) noexcept
 
 HashMapIterator (const HashMapIterator &it) noexcept=default
 
 HashMapIterator (HashMapIterator &&it) noexcept=default
 
 ~HashMapIterator () noexcept=default
 
HashMapIteratoroperator= (const HashMapIterator &it) noexcept=default
 
HashMapIteratoroperator= (HashMapIterator &&it) noexcept=default
 
HashMapIteratoroperator++ () noexcept
 
HashMapIterator operator++ (int) noexcept
 
reference operator* () noexcept
 
pointer operator-> () noexcept
 
 operator bool () const noexcept
 Check if the iterator is valid. More...
 
void swap (HashMapIterator &it) noexcept
 Swap two instances. More...
 

Friends

bool operator== (const HashMapIterator &it1, const HashMapIterator &it2) noexcept
 
bool operator!= (const HashMapIterator &it1, const HashMapIterator &it2) noexcept
 
template<class UContainer , typename UKey , typename UValue >
void swap (HashMapIterator< UContainer, UKey, UValue > &it1, HashMapIterator< UContainer, UKey, UValue > &it2) noexcept
 

Detailed Description

template<class TContainer, typename TKey, typename TValue>
class CppCommon::HashMapIterator< TContainer, TKey, TValue >

Hash map iterator.

Not thread-safe.

Definition at line 223 of file hashmap.h.

Member Typedef Documentation

◆ const_pointer

template<class TContainer , typename TKey , typename TValue >
typedef const value_type* CppCommon::HashMapIterator< TContainer, TKey, TValue >::const_pointer

Definition at line 234 of file hashmap.h.

◆ const_reference

template<class TContainer , typename TKey , typename TValue >
typedef const value_type& CppCommon::HashMapIterator< TContainer, TKey, TValue >::const_reference

Definition at line 232 of file hashmap.h.

◆ difference_type

template<class TContainer , typename TKey , typename TValue >
typedef ptrdiff_t CppCommon::HashMapIterator< TContainer, TKey, TValue >::difference_type

Definition at line 235 of file hashmap.h.

◆ iterator_category

template<class TContainer , typename TKey , typename TValue >
typedef std::bidirectional_iterator_tag CppCommon::HashMapIterator< TContainer, TKey, TValue >::iterator_category

Definition at line 237 of file hashmap.h.

◆ pointer

template<class TContainer , typename TKey , typename TValue >
typedef value_type* CppCommon::HashMapIterator< TContainer, TKey, TValue >::pointer

Definition at line 233 of file hashmap.h.

◆ reference

template<class TContainer , typename TKey , typename TValue >
typedef value_type& CppCommon::HashMapIterator< TContainer, TKey, TValue >::reference

Definition at line 231 of file hashmap.h.

◆ size_type

template<class TContainer , typename TKey , typename TValue >
typedef size_t CppCommon::HashMapIterator< TContainer, TKey, TValue >::size_type

Definition at line 236 of file hashmap.h.

◆ value_type

template<class TContainer , typename TKey , typename TValue >
typedef std::pair<TKey, TValue> CppCommon::HashMapIterator< TContainer, TKey, TValue >::value_type

Definition at line 230 of file hashmap.h.

Constructor & Destructor Documentation

◆ HashMapIterator() [1/5]

template<class TContainer , typename TKey , typename TValue >
CppCommon::HashMapIterator< TContainer, TKey, TValue >::HashMapIterator ( )
inlinenoexcept

Definition at line 239 of file hashmap.h.

◆ HashMapIterator() [2/5]

template<class TContainer , typename TKey , typename TValue >
CppCommon::HashMapIterator< TContainer, TKey, TValue >::HashMapIterator ( TContainer *  container)
inlineexplicitnoexcept

Definition at line 331 of file hashmap.inl.

◆ HashMapIterator() [3/5]

template<class TContainer , typename TKey , typename TValue >
CppCommon::HashMapIterator< TContainer, TKey, TValue >::HashMapIterator ( TContainer *  container,
size_t  index 
)
inlineexplicitnoexcept

Definition at line 241 of file hashmap.h.

◆ HashMapIterator() [4/5]

template<class TContainer , typename TKey , typename TValue >
CppCommon::HashMapIterator< TContainer, TKey, TValue >::HashMapIterator ( const HashMapIterator< TContainer, TKey, TValue > &  it)
defaultnoexcept

◆ HashMapIterator() [5/5]

template<class TContainer , typename TKey , typename TValue >
CppCommon::HashMapIterator< TContainer, TKey, TValue >::HashMapIterator ( HashMapIterator< TContainer, TKey, TValue > &&  it)
defaultnoexcept

◆ ~HashMapIterator()

template<class TContainer , typename TKey , typename TValue >
CppCommon::HashMapIterator< TContainer, TKey, TValue >::~HashMapIterator ( )
defaultnoexcept

Member Function Documentation

◆ operator bool()

template<class TContainer , typename TKey , typename TValue >
CppCommon::HashMapIterator< TContainer, TKey, TValue >::operator bool ( ) const
inlineexplicitnoexcept

Check if the iterator is valid.

Definition at line 261 of file hashmap.h.

◆ operator*()

template<class TContainer , typename TKey , typename TValue >
HashMapIterator< TContainer, TKey, TValue >::reference CppCommon::HashMapIterator< TContainer, TKey, TValue >::operator*
noexcept

Definition at line 389 of file hashmap.inl.

◆ operator++() [1/2]

template<class TContainer , typename TKey , typename TValue >
HashMapIterator< TContainer, TKey, TValue > & CppCommon::HashMapIterator< TContainer, TKey, TValue >::operator++
noexcept

Definition at line 359 of file hashmap.inl.

◆ operator++() [2/2]

template<class TContainer , typename TKey , typename TValue >
HashMapIterator< TContainer, TKey, TValue > CppCommon::HashMapIterator< TContainer, TKey, TValue >::operator++ ( int  )
inlinenoexcept

Definition at line 381 of file hashmap.inl.

◆ operator->()

template<class TContainer , typename TKey , typename TValue >
HashMapIterator< TContainer, TKey, TValue >::pointer CppCommon::HashMapIterator< TContainer, TKey, TValue >::operator->
noexcept

Definition at line 397 of file hashmap.inl.

◆ operator=() [1/2]

template<class TContainer , typename TKey , typename TValue >
HashMapIterator& CppCommon::HashMapIterator< TContainer, TKey, TValue >::operator= ( const HashMapIterator< TContainer, TKey, TValue > &  it)
defaultnoexcept

◆ operator=() [2/2]

template<class TContainer , typename TKey , typename TValue >
HashMapIterator& CppCommon::HashMapIterator< TContainer, TKey, TValue >::operator= ( HashMapIterator< TContainer, TKey, TValue > &&  it)
defaultnoexcept

◆ swap()

template<class TContainer , typename TKey , typename TValue >
void CppCommon::HashMapIterator< TContainer, TKey, TValue >::swap ( HashMapIterator< TContainer, TKey, TValue > &  it)
noexcept

Swap two instances.

Definition at line 403 of file hashmap.inl.

Friends And Related Function Documentation

◆ operator!=

template<class TContainer , typename TKey , typename TValue >
bool operator!= ( const HashMapIterator< TContainer, TKey, TValue > &  it1,
const HashMapIterator< TContainer, TKey, TValue > &  it2 
)
friend

Definition at line 251 of file hashmap.h.

◆ operator==

template<class TContainer , typename TKey , typename TValue >
bool operator== ( const HashMapIterator< TContainer, TKey, TValue > &  it1,
const HashMapIterator< TContainer, TKey, TValue > &  it2 
)
friend

Definition at line 249 of file hashmap.h.

◆ swap

template<class TContainer , typename TKey , typename TValue >
template<class UContainer , typename UKey , typename UValue >
void swap ( HashMapIterator< UContainer, UKey, UValue > &  it1,
HashMapIterator< UContainer, UKey, UValue > &  it2 
)
friend

The documentation for this class was generated from the following files: