template<class K, class T, class HashFunc, std::uint32_t 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, std::uint32_t 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, std::uint32_t 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.