template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
nCine::StaticHashMapIterator class

Static hashmap iterator.

Public types

enum class SentinelTagInit { BEGINNING, END }
Sentinel tags to initialize the iterator at the beginning and end.
using Reference = typename IteratorTraits<StaticHashMapIterator>::Reference
Reference type which respects iterator constness.

Constructors, destructors, conversion operators

StaticHashMapIterator(typename StaticHashMapHelperTraits<K, T, HashFunc, Capacity, IsConst>::HashMapPtr hashMap, unsigned int bucketIndex)
StaticHashMapIterator(typename StaticHashMapHelperTraits<K, T, HashFunc, Capacity, IsConst>::HashMapPtr hashMap, SentinelTagInit tag)
StaticHashMapIterator(const StaticHashMapIterator<K, T, HashFunc, Capacity, false>& it)
Copy constructor to implicitly convert a non constant iterator to a constant one.

Public functions

auto operator*() const -> Reference
Deferencing operator.
auto operator++() -> StaticHashMapIterator&
Iterates to the next element (prefix)
auto operator++(int) -> StaticHashMapIterator
Iterates to the next element (postfix)
auto operator--() -> StaticHashMapIterator&
Iterates to the previous element (prefix)
auto operator--(int) -> StaticHashMapIterator
Iterates to the previous element (postfix)
auto node() const -> StaticHashMapHelperTraits<K, T, HashFunc, Capacity, IsConst>::NodeReference
Returns the hashmap node currently pointed by the iterator.
auto value() const -> const T&
Returns the value associated to the currently pointed node.
auto key() const -> const K&
Returns the key associated to the currently pointed node.
auto hash() const -> hash_t
Returns the hash associated to the currently pointed node.

Friends

auto operator==(const StaticHashMapIterator& lhs, const StaticHashMapIterator& rhs) -> bool
Equality operator.
auto operator!=(const StaticHashMapIterator& lhs, const StaticHashMapIterator& rhs) -> bool
Inequality operator.

Enum documentation

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
enum class nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::SentinelTagInit

Sentinel tags to initialize the iterator at the beginning and end.

Enumerators
BEGINNING

Iterator at the beginning, next element is the first one.

END

Iterator at the end, previous element is the last one.

Typedef documentation

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
using nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::Reference = typename IteratorTraits<StaticHashMapIterator>::Reference

Reference type which respects iterator constness.

Function documentation

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::StaticHashMapIterator(typename StaticHashMapHelperTraits<K, T, HashFunc, Capacity, IsConst>::HashMapPtr hashMap, unsigned int bucketIndex)

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::StaticHashMapIterator(typename StaticHashMapHelperTraits<K, T, HashFunc, Capacity, IsConst>::HashMapPtr hashMap, SentinelTagInit tag)

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::StaticHashMapIterator(const StaticHashMapIterator<K, T, HashFunc, Capacity, false>& it)

Copy constructor to implicitly convert a non constant iterator to a constant one.

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
Reference nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::operator*() const

Deferencing operator.

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
StaticHashMapIterator& nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::operator++()

Iterates to the next element (prefix)

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
StaticHashMapIterator nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::operator++(int)

Iterates to the next element (postfix)

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
StaticHashMapIterator& nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::operator--()

Iterates to the previous element (prefix)

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
StaticHashMapIterator nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::operator--(int)

Iterates to the previous element (postfix)

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
StaticHashMapHelperTraits<K, T, HashFunc, Capacity, IsConst>::NodeReference nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::node() const

Returns the hashmap node currently pointed by the iterator.

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
const T& nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::value() const

Returns the value associated to the currently pointed node.

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
const K& nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::key() const

Returns the key associated to the currently pointed node.

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
hash_t nCine::StaticHashMapIterator<K, T, HashFunc, Capacity, IsConst>::hash() const

Returns the hash associated to the currently pointed node.

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
bool operator==(const StaticHashMapIterator& lhs, const StaticHashMapIterator& rhs)

Equality operator.

template<class K, class T, class HashFunc, unsigned int Capacity, bool IsConst>
bool operator!=(const StaticHashMapIterator& lhs, const StaticHashMapIterator& rhs)

Inequality operator.