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 232 of file hashtablebase.inl.
Public Method Index: | |
TIterator ()=default | |
Default constructor. Keeps everything uninitialized. | |
TIterator (const TIterator &other)=default | |
TMutable | 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 244 of file hashtablebase.inl.
|
private |
Implementation of std::iterator_traits
.
Definition at line 242 of file hashtablebase.inl.
|
private |
Implementation of std::iterator_traits
.
Definition at line 245 of file hashtablebase.inl.
|
private |
Implementation of std::iterator_traits
.
Definition at line 246 of file hashtablebase.inl.
|
private |
Const or mutable version of HashTableBase.
Definition at line 240 of file hashtablebase.inl.
|
private |
Implementation of std::iterator_traits
.
Definition at line 243 of file hashtablebase.inl.
|
protected |
The actual bucket index.
Definition at line 253 of file hashtablebase.inl.
|
protected |
The pointer to the actual element.
Definition at line 256 of file hashtablebase.inl.
|
protected |
The pointer to the hash table.
Definition at line 250 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 263 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 286 of file hashtablebase.inl.
|
default |
Copy constructor (default).
other | The iterator to assign from. |
TMutable 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 418 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 427 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 384 of file hashtablebase.inl.
|
inline |
Retrieves the stored object that this iterator references.
Definition at line 394 of file hashtablebase.inl.
|
inline |
Prefix increment operator.
Definition at line 340 of file hashtablebase.inl.
|
inline |
Postfix increment operator.
Definition at line 365 of file hashtablebase.inl.
|
inline |
Retrieves a pointer to the stored object that this iterator references.
Definition at line 402 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 376 of file hashtablebase.inl.
|
inlineprotected |
Moves an iterator with a nulled element pointer to the next element.
Definition at line 293 of file hashtablebase.inl.
|
inline |
Retrieves the stored object that this iterator references.
Definition at line 410 of file hashtablebase.inl.