![]() |
ATLAS Offline Software
|
Bidirectional iterator over occupied table entries. More...
#include <ConcurrentHashmapImpl.h>
Public Member Functions | |
const_iterator (const Table &table, bool end) | |
Constructor. More... | |
const_iterator (const Table &table, size_t offset) | |
Constructor. More... | |
void | next () |
Advance the iterator to the next occupied entry. More... | |
void | prev () |
Move the iterator back to the previous occupied entry. More... | |
val_t | key () const |
Return the key for this iterator. More... | |
val_t | value () const |
Return the value for this iterator. More... | |
bool | operator!= (const const_iterator &other) const |
Compare two iterators. More... | |
bool | valid () const |
Check that the iterator is valid (not pointing at the end). More... | |
Private Attributes | |
const Table & | m_table |
The table over which we're iterating. More... | |
size_t | m_offset |
The current position in the table. More... | |
Bidirectional iterator over occupied table entries.
This is not itself a compliant STL iterator. Derived classes are meant to build a user-facing iterator on top of this.
Definition at line 425 of file ConcurrentHashmapImpl.h.
CxxUtils::detail::ConcurrentHashmapImpl< UPDATER_, HASHER_, MATCHER_, NULLVAL_, TOMBSTONE_ >::const_iterator::const_iterator | ( | const Table & | table, |
bool | end | ||
) |
Constructor.
table | The table instance we're referencing. |
end | If true, initialize this to an end iterator. Otherwise, initialize it to a a begin iterator. |
CxxUtils::detail::ConcurrentHashmapImpl< UPDATER_, HASHER_, MATCHER_, NULLVAL_, TOMBSTONE_ >::const_iterator::const_iterator | ( | const Table & | table, |
size_t | offset | ||
) |
Constructor.
table | The table instance we're referencing. |
offset | Offset of the iterator within the table. (Must point at an occupied entry.) |
val_t CxxUtils::detail::ConcurrentHashmapImpl< UPDATER_, HASHER_, MATCHER_, NULLVAL_, TOMBSTONE_ >::const_iterator::key | ( | ) | const |
Return the key for this iterator.
If deletions are allowed, then the key may change asynchronously to the tombstone value.
void CxxUtils::detail::ConcurrentHashmapImpl< UPDATER_, HASHER_, MATCHER_, NULLVAL_, TOMBSTONE_ >::const_iterator::next | ( | ) |
Advance the iterator to the next occupied entry.
bool CxxUtils::detail::ConcurrentHashmapImpl< UPDATER_, HASHER_, MATCHER_, NULLVAL_, TOMBSTONE_ >::const_iterator::operator!= | ( | const const_iterator & | other | ) | const |
Compare two iterators.
void CxxUtils::detail::ConcurrentHashmapImpl< UPDATER_, HASHER_, MATCHER_, NULLVAL_, TOMBSTONE_ >::const_iterator::prev | ( | ) |
Move the iterator back to the previous occupied entry.
bool CxxUtils::detail::ConcurrentHashmapImpl< UPDATER_, HASHER_, MATCHER_, NULLVAL_, TOMBSTONE_ >::const_iterator::valid | ( | ) | const |
Check that the iterator is valid (not pointing at the end).
val_t CxxUtils::detail::ConcurrentHashmapImpl< UPDATER_, HASHER_, MATCHER_, NULLVAL_, TOMBSTONE_ >::const_iterator::value | ( | ) | const |
Return the value for this iterator.
|
private |
The current position in the table.
Set to -1 for an end iterator.
Definition at line 489 of file ConcurrentHashmapImpl.h.
|
private |
The table over which we're iterating.
Definition at line 486 of file ConcurrentHashmapImpl.h.