Templated implementation of std::iterator_traits. Will be exposed by derived class's definitions Iterator and ConstIterator.
As the name of the class indicates, this iterator satisfies the C++ standard library concept ForwardIterator .
| TConstOrMutable | A constant or mutable version of the parent's template type TMapped. |
Definition at line 221 of file hashtablebase.inl.
Public Method Index: | |
| TIterator ()=default | |
| Default constructor. Keeps everything uninitialized. | |
| TIterator (const TIterator &other)=default | |
| template<typename TMutable> requires std::same_as<TMutable, TIterator<T>> | |
| TIterator (const TMutable &mutableIt) | |
| const TKey & | Key () const |
| TMapped & | Mapped () const |
| bool | operator!= (TIterator other) const |
| TConstOrMutable & | operator* () const |
| TIterator & | operator++ () |
| TIterator | operator++ (int) |
| TConstOrMutable * | operator-> () const |
| TIterator & | operator= (const TIterator &other)=default |
| bool | operator== (TIterator other) const |
| TConstOrMutable & | Value () const |
Protected Field Index: | |
| uinteger | bucketIdx |
| The actual bucket index. | |
| Element * | element |
| The pointer to the actual element. | |
| THashtable * | table |
| The pointer to the hash table. | |
Protected Method Index: | |
| TIterator (THashtable *pTable, uinteger pBbucketIx) | |
| TIterator (THashtable *pTable, uinteger pBbucketIx, Element *pElement) | |
| void | repair () |
| Moves an iterator with a nulled element pointer to the next 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 | THashtable |
| Const or mutable version of HashTableBase. | |
| using | value_type = TMapped |
Implementation of std::iterator_traits. | |
|
private |
Implementation of std::iterator_traits.
Definition at line 234 of file hashtablebase.inl.
|
private |
Implementation of std::iterator_traits.
Definition at line 232 of file hashtablebase.inl.
|
private |
Implementation of std::iterator_traits.
Definition at line 235 of file hashtablebase.inl.
|
private |
Implementation of std::iterator_traits.
Definition at line 236 of file hashtablebase.inl.
|
private |
Const or mutable version of HashTableBase.
Definition at line 229 of file hashtablebase.inl.
|
private |
Implementation of std::iterator_traits.
Definition at line 233 of file hashtablebase.inl.
|
protected |
The actual bucket index.
Definition at line 243 of file hashtablebase.inl.
|
protected |
The pointer to the actual element.
Definition at line 246 of file hashtablebase.inl.
|
protected |
The pointer to the hash table.
Definition at line 240 of file hashtablebase.inl.
|
inlineprotected |
Internal constructor. Searches the first element, starting with given bucket number.
| pTable | Pointer to the hash table. |
| pBbucketIx | The bucket index. |
Definition at line 253 of file hashtablebase.inl.
|
inlineprotected |
Internal constructor creating a specific iterator.
| pTable | Pointer to the hash table. |
| pBbucketIx | The bucket index. |
| pElement | Pointer to the current element. |
Definition at line 274 of file hashtablebase.inl.
|
default |
Copy constructor (default).
| other | The iterator to assign from. |
|
inline |
Copy constructor accepting a mutable iterator. Available only for the constant version of this iterator.
| TMutable | The type of this constructor's argument. |
| mutableIt | Mutable iterator to copy from. |
Definition at line 313 of file hashtablebase.inl.
|
inline |
Retrieves the key-portion of the stored object that this iterator references.
Definition at line 398 of file hashtablebase.inl.
|
inline |
Retrieves the mapped-portion of the stored object that this iterator references. This method is an alias to operator*
Definition at line 407 of file hashtablebase.inl.
|
inline |
Comparison operator.
| other | The iterator to compare ourselves to. |
true if this and given iterator are not equal, false otherwise. Definition at line 364 of file hashtablebase.inl.
|
inline |
Retrieves the stored object that this iterator references.
Definition at line 374 of file hashtablebase.inl.
|
inline |
Prefix increment operator.
Definition at line 322 of file hashtablebase.inl.
|
inline |
Postfix increment operator.
Definition at line 345 of file hashtablebase.inl.
|
inline |
Retrieves a pointer to the stored object that this iterator references.
Definition at line 382 of file hashtablebase.inl.
|
default |
Copy assignment (default).
| other | The iterator to assign from. |
|
inline |
Comparison operator.
| other | The iterator to compare ourselves to. |
true if this and the given iterator are pointing to the same element, false otherwise. Definition at line 356 of file hashtablebase.inl.
|
inlineprotected |
Moves an iterator with a nulled element pointer to the next element.
Definition at line 281 of file hashtablebase.inl.
|
inline |
Retrieves the stored object that this iterator references.
Definition at line 390 of file hashtablebase.inl.