ALib C++ Framework
by
Library Version: 2605 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable > Class Template Reference

Description:

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
class alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >

Templated implementation of std::iterator_traits. Will be exposed by derived class's definitions LocalIterator and ConstLocalIterator.

As the name of the class indicates, this iterator satisfies the C++ standard library concept ForwardIterator .

Template Parameters
TConstOrMutableA constant or mutable version of template parameter T.

Definition at line 393 of file hashtablebase.hpp.

#include <hashtablebase.hpp>

Public Method Index:

 TLocalIterator ()
 Default constructor.
 TLocalIterator (const TLocalIterator &other)=default
template<typename TMutable>
 TLocalIterator (const TMutable &mutableIt)
 TLocalIterator (uinteger pBucketIdx, Element *pElement)
const TKeyKey () const
TMappedMapped () const
bool operator!= (TLocalIterator other) const
TConstOrMutable & operator* () const
TLocalIteratoroperator++ ()
TLocalIterator operator++ (int)
TConstOrMutable * operator-> () const
TLocalIteratoroperator= (const TLocalIterator &other)=default
bool operator== (TLocalIterator other) const
TConstOrMutable & Value () const

Protected Field Index:

uinteger bucketIdx
 The index of the bucket that this iterator works on.
Elementelement
 The pointer to the actual element.

Private Type Index:

using difference_type = integer
 Implementation of std::iterator_traits.
using iterator_category = std::forward_iterator_tag
 Implementation of std::iterator_traits.
using pointer = TConstOrMutable*
 Implementation of std::iterator_traits.
using reference = TConstOrMutable&
 Implementation of std::iterator_traits.
using value_type = TConstOrMutable
 Implementation of std::iterator_traits.

Type Definition Details:

◆ difference_type

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
using alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::difference_type = integer
private

Implementation of std::iterator_traits.

Definition at line 401 of file hashtablebase.hpp.

◆ iterator_category

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
using alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::iterator_category = std::forward_iterator_tag
private

Implementation of std::iterator_traits.

Definition at line 399 of file hashtablebase.hpp.

◆ pointer

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
using alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::pointer = TConstOrMutable*
private

Implementation of std::iterator_traits.

Definition at line 402 of file hashtablebase.hpp.

◆ reference

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
using alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::reference = TConstOrMutable&
private

Implementation of std::iterator_traits.

Definition at line 403 of file hashtablebase.hpp.

◆ value_type

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
using alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::value_type = TConstOrMutable
private

Implementation of std::iterator_traits.

Definition at line 400 of file hashtablebase.hpp.

Field Details:

◆ bucketIdx

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
uinteger alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::bucketIdx
protected

The index of the bucket that this iterator works on.

Definition at line 410 of file hashtablebase.hpp.

◆ element

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
Element* alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::element
protected

The pointer to the actual element.

Definition at line 407 of file hashtablebase.hpp.

Constructor(s) / Destructor Details:

◆ TLocalIterator() [1/4]

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::TLocalIterator ( )
inline

Default constructor.

Definition at line 414 of file hashtablebase.hpp.

◆ TLocalIterator() [2/4]

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::TLocalIterator ( const TLocalIterator< TConstOrMutable > & other)
default

Copy constructor (default).

Parameters
otherThe iterator to assign from.
Here is the call graph for this function:

◆ TLocalIterator() [3/4]

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
template<typename TMutable>
alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::TLocalIterator ( const TMutable & mutableIt)
inline

Copy constructor accepting a mutable iterator. Available only for the constant version of this iterator.

Template Parameters
TMutableThe type of this constructor's argument.
Parameters
mutableItMutable iterator to copy from.

Definition at line 426 of file hashtablebase.hpp.

◆ TLocalIterator() [4/4]

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::TLocalIterator ( uinteger pBucketIdx,
Element * pElement )
inlineexplicit

Constructor.

Parameters
pBucketIdxIndex of the bucket this iterator works on.
pElementPointer to current element.

Definition at line 433 of file hashtablebase.hpp.

Method Details:

◆ Key()

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
const TKey & alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::Key ( ) const
inline

Retrieves the key-portion of the stored object that this iterator references.

Returns
A reference to the key-portion of the stored object.

Definition at line 499 of file hashtablebase.hpp.

◆ Mapped()

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
TMapped & alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::Mapped ( ) const
inline

Retrieves the stored object that this iterator references.
This method is an alias to operator*

Returns
A reference to the mapped-portion of the stored object.

Definition at line 507 of file hashtablebase.hpp.

◆ operator!=()

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
bool alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::operator!= ( TLocalIterator< TConstOrMutable > other) const
inline

Comparison operator.

Parameters
otherThe iterator to compare ourselves to.
Returns
true if this and given iterator are not equal, false otherwise.

Definition at line 472 of file hashtablebase.hpp.

Here is the call graph for this function:

◆ operator*()

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
TConstOrMutable & alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::operator* ( ) const
inline

Retrieves the stored object that this iterator references.

Returns
A reference to the stored object.

Definition at line 478 of file hashtablebase.hpp.

◆ operator++() [1/2]

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
TLocalIterator & alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::operator++ ( )
inline

Prefix increment operator.

Returns
A reference to this object.

Definition at line 446 of file hashtablebase.hpp.

Here is the call graph for this function:

◆ operator++() [2/2]

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
TLocalIterator alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::operator++ ( int )
inline

Postfix increment operator.

Returns
An iterator value that is not increased, yet.

Definition at line 454 of file hashtablebase.hpp.

Here is the call graph for this function:

◆ operator->()

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
TConstOrMutable * alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::operator-> ( ) const
inline

Retrieves a pointer to the stored object that this iterator references.

Returns
A pointer to the stored object.

Definition at line 485 of file hashtablebase.hpp.

◆ operator=()

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
TLocalIterator & alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::operator= ( const TLocalIterator< TConstOrMutable > & other)
default

Copy assignment (default).

Parameters
otherThe iterator to assign from.
Returns
A reference to this object.
Here is the call graph for this function:

◆ operator==()

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
bool alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::operator== ( TLocalIterator< TConstOrMutable > other) const
inline

Comparison operator.

Parameters
otherThe iterator to compare ourselves to.
Returns
true if this and the given iterator are pointing to the same element, false otherwise.

Definition at line 464 of file hashtablebase.hpp.

Here is the call graph for this function:

◆ Value()

template<typename TAllocator, typename TValueDescriptor, typename THash, typename TEqual, lang::Caching THashCaching, Recycling TRecycling>
template<typename TConstOrMutable>
TConstOrMutable & alib::containers::detail::HashTableBase< TAllocator, TValueDescriptor, THash, TEqual, THashCaching, TRecycling >::TLocalIterator< TConstOrMutable >::Value ( ) const
inline

Retrieves the stored object that this iterator references.

Returns
A reference to the stored object.

Definition at line 492 of file hashtablebase.hpp.


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