nCine 2025.07.r505-7e70e87
A cross-platform 2D game engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
nctl::HashSetIterator< K, HashFunc > Class Template Reference

A hashset iterator. More...

#include <HashSetIterator.h>

Public Types

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

Public Member Functions

 HashSetIterator (typename HashSetHelperTraits< K, HashFunc >::HashSetPtr hashSet, unsigned int bucketIndex)
 
 HashSetIterator (typename HashSetHelperTraits< K, HashFunc >::HashSetPtr hashSet, SentinelTagInit tag)
 
Reference operator* () const
 Deferencing operator.
 
HashSetIteratoroperator++ ()
 Iterates to the next element (prefix)
 
HashSetIterator operator++ (int)
 Iterates to the next element (postfix)
 
HashSetIteratoroperator-- ()
 Iterates to the previous element (prefix)
 
HashSetIterator operator-- (int)
 Iterates to the previous element (postfix)
 
const K & key () const
 Returns the key associated to the currently pointed element.
 
hash_t hash () const
 Returns the hash associated to the currently pointed element.
 

Friends

bool operator== (const HashSetIterator &lhs, const HashSetIterator &rhs)
 Equality operator.
 
bool operator!= (const HashSetIterator &lhs, const HashSetIterator &rhs)
 Inequality operator.
 

Detailed Description

template<class K, class HashFunc>
class nctl::HashSetIterator< K, HashFunc >

A hashset iterator.

Member Enumeration Documentation

◆ SentinelTagInit

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

Enumerator
BEGINNING 

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

END 

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


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