HybridMap< K, V, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >::NonConstIteratorBase Class Reference

#include <hybridmap.h>

Inheritance diagram for HybridMap< K, V, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >::NonConstIteratorBase:

Public Types

using SmallIterator = typename SmallType::Iterator
 
using LargeIterator = typename LargeType::Iterator
 
- Public Types inherited from HybridMap< K, V, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >::IteratorBase< false >
using SmallIterator = typename std::conditional< CONSTITERATOR, typename SmallType::ConstIterator, typename SmallType::Iterator >::type
 
using LargeIterator = typename std::conditional< CONSTITERATOR, typename LargeType::ConstIterator, typename LargeType::Iterator >::type
 
using CollectionType = typename ConstIf< HybridMap, CONSTITERATOR >::type
 

Public Member Functions

 NonConstIteratorBase ()
 
 NonConstIteratorBase (const SmallIterator &src)
 
 NonConstIteratorBase (const LargeIterator &src)
 
 NonConstIteratorBase (const NonConstIteratorBase &src)
 
 NonConstIteratorBase (HybridMap &m, Int s)
 
Result< void > Erase (HybridMap &map, Int eraseCnt=1)
 
ResultMem ChangeKey (HybridMap &map, const K &newKey)
 
- Public Member Functions inherited from HybridMap< K, V, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >::IteratorBase< false >
 IteratorBase ()
 
 IteratorBase (const SmallIterator &src)
 
 IteratorBase (const LargeIterator &src)
 
 IteratorBase (const IteratorBase &src)
 
 IteratorBase (CollectionType &m, Int s)
 
 ~IteratorBase ()
 
void operator++ ()
 
void operator-- ()
 
 operator Bool () const
 
const K & GetKey () const
 
ConstIf< V, CONSTITERATOR >::typeGetValue () const
 
Bool operator== (const IteratorBase &b) const
 
Bool operator!= (const IteratorBase &b) const
 

Private Types

using Super = IteratorBase< false >
 

Additional Inherited Members

- Protected Member Functions inherited from HybridMap< K, V, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >::IteratorBase< false >
SmallIteratorGetSmall ()
 
const SmallIteratorGetSmall () const
 
LargeIteratorGetLarge ()
 
const LargeIteratorGetLarge () const
 
- Protected Attributes inherited from HybridMap< K, V, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >::IteratorBase< false >
Bool _small
 
std::aligned_union< 0, SmallIterator, LargeIterator >::type _union [1]
 

Member Typedef Documentation

◆ Super

using Super = IteratorBase<false>
private

◆ SmallIterator

using SmallIterator = typename SmallType::Iterator

◆ LargeIterator

using LargeIterator = typename LargeType::Iterator

Constructor & Destructor Documentation

◆ NonConstIteratorBase() [1/5]

◆ NonConstIteratorBase() [2/5]

NonConstIteratorBase ( const SmallIterator src)
explicit

◆ NonConstIteratorBase() [3/5]

NonConstIteratorBase ( const LargeIterator src)
explicit

◆ NonConstIteratorBase() [4/5]

◆ NonConstIteratorBase() [5/5]

Member Function Documentation

◆ Erase()

Result<void> Erase ( HybridMap map,
Int  eraseCnt = 1 
)

Removes eraseCnt elements from the map starting at the position given by this iterator. Afterwards, this iterator will point to the element behind the last removed element.

Parameters
[in]mapMap of this iterator.
[in]eraseCntNumber of elements to remove.
Returns
OK on success.

◆ ChangeKey()

ResultMem ChangeKey ( HybridMap map,
const K &  newKey 
)

Modifies the key of the map entry pointed to by this iterator. This operation is only supported if both underlying implementations support it. The new key must be in a range such that this operation doesn't change the order, i.e., it must be above the key of the previous entry and below the key of the next entry.

Parameters
[in]mapMap of this iterator.
[in]newKeyNew value for the key of the current map entry.
Returns
False if some allocation failed.