![]() |
nCine 2025.07.r505-7e70e87
A cross-platform 2D game engine
|
A hashmap iterator. More...
#include <HashMapIterator.h>
Public Types | |
enum class | SentinelTagInit { BEGINNING , END } |
Sentinel tags to initialize the iterator at the beginning and end. More... | |
using | Reference = typename IteratorTraits< HashMapIterator >::Reference |
Reference type which respects iterator constness. | |
Public Member Functions | |
HashMapIterator (typename HashMapHelperTraits< K, T, HashFunc, IsConst >::HashMapPtr hashMap, unsigned int bucketIndex) | |
HashMapIterator (typename HashMapHelperTraits< K, T, HashFunc, IsConst >::HashMapPtr hashMap, SentinelTagInit tag) | |
HashMapIterator (const HashMapIterator< K, T, HashFunc, false > &it) | |
Copy constructor to implicitly convert a non constant iterator to a constant one. | |
Reference | operator* () const |
Deferencing operator. | |
HashMapIterator & | operator++ () |
Iterates to the next element (prefix) | |
HashMapIterator | operator++ (int) |
Iterates to the next element (postfix) | |
HashMapIterator & | operator-- () |
Iterates to the previous element (prefix) | |
HashMapIterator | operator-- (int) |
Iterates to the previous element (postfix) | |
HashMapHelperTraits< K, T, HashFunc, IsConst >::NodeReference | node () const |
Returns the hashmap node currently pointed by the iterator. | |
const T & | value () const |
Returns the value associated to the currently pointed node. | |
const K & | key () const |
Returns the key associated to the currently pointed node. | |
hash_t | hash () const |
Returns the hash associated to the currently pointed node. | |
Friends | |
class | HashMapIterator< K, T, HashFunc, true > |
For non constant to constant iterator implicit conversion. | |
bool | operator== (const HashMapIterator &lhs, const HashMapIterator &rhs) |
Equality operator. | |
bool | operator!= (const HashMapIterator &lhs, const HashMapIterator &rhs) |
Inequality operator. | |
A hashmap iterator.