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 335 of file hashtablebase.inl.
Public Methods | |
| TIterator ()=default | |
| TIterator (const TIterator &other)=default | |
| TIterator (const TMutable &mutableIt) | |
| const TKey & | Key () const |
| template<typename TEnableIf = 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 Fields | |
| uinteger | bucketIdx |
| Element * | element |
| THashtable * | table |
Protected Methods | |
| TIterator (THashtable *pTable, uinteger pBbucketIx) | |
| TIterator (THashtable *pTable, uinteger pBbucketIx, Element *pElement) | |
| void | repair () |
Private Types | |
| 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 = ATMP_IF_T_F(!ATMP_IS_CONST(TConstOrMutable), HashTableBase, const HashTableBase) |
| using | value_type = TMapped |
Implementation of std::iterator_traits. | |
|
private |
Const or mutable version of HashTableBase.
Definition at line 344 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 367 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 391 of file hashtablebase.inl.
|
default |
Default constructor. Keeps everything uninitialized.
Copy constructor (default).
| other | The iterator to assign from. |
| TIterator | ( | const TMutable & | mutableIt | ) |
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. |
|
inline |
Retrieves the key-portion of the stored object that this iterator references.
Definition at line 524 of file hashtablebase.inl.
|
inline |
Retrieves the mapped-portion of the stored object that this iterator references. This method is an alias to operator*
This method is only available with hash map mode.
Definition at line 540 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 490 of file hashtablebase.inl.
|
inline |
Retrieves the stored object that this iterator references.
Definition at line 500 of file hashtablebase.inl.
|
inline |
Prefix increment operator.
Definition at line 446 of file hashtablebase.inl.
|
inline |
Postfix increment operator.
Definition at line 471 of file hashtablebase.inl.
|
inline |
Retrieves a pointer to the stored object that this iterator references.
Definition at line 508 of file hashtablebase.inl.
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 482 of file hashtablebase.inl.
|
inlineprotected |
Moves an iterator with a nulled element pointer to the next element.
Definition at line 398 of file hashtablebase.inl.
|
inline |
Retrieves the stored object that this iterator references.
Definition at line 516 of file hashtablebase.inl.
|
protected |
The actual bucket index.
Definition at line 356 of file hashtablebase.inl.
|
protected |
The pointer to the actual element.
Definition at line 359 of file hashtablebase.inl.
|
protected |
The pointer to the hash table.
Definition at line 353 of file hashtablebase.inl.