BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >::NonConstIteratorBase Class Reference

#include <bursttriemap.h>

Inheritance diagram for BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >::NonConstIteratorBase:

Public Member Functions

 NonConstIteratorBase ()
 
 NonConstIteratorBase (BurstTrieMap *m, Int s)
 
 NonConstIteratorBase (const NonConstIteratorBase &src)
 
V & GetValue () const
 
ResultOk< void > Erase (BurstTrieMap &map, Int eraseCnt=1)
 
ResultMem ChangeKey (BurstTrieMap &map, K newKey)
 
- Public Member Functions inherited from BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >::IteratorBase
 IteratorBase ()
 
 IteratorBase (const BurstTrieMap *m, Int s)
 
 IteratorBase (const IteratorBase &src)
 
 operator Bool () const
 
const K & GetKey () const
 
const V & GetValue () const
 
Bool operator== (const IteratorBase &b) const
 
Bool operator< (const IteratorBase &b) const
 
 MAXON_OPERATOR_COMPARISON (IteratorBase)
 

Additional Inherited Members

- Protected Member Functions inherited from BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >::IteratorBase
void MoveToNext (Bool init)
 
void MoveToPrev ()
 
- Protected Attributes inherited from BurstTrieMap< K, V, GROUP_BITS, BUCKET_SIZE, SORT, POOL >::IteratorBase
BurstTrieMap_map
 
Int _rootIndex
 
Int _bucketIndex
 
Int _top
 
Bucket_bucket
 
Node_path [MAX_LEN]
 
Int32 _index [MAX_LEN]
 

Constructor & Destructor Documentation

◆ NonConstIteratorBase() [1/3]

◆ NonConstIteratorBase() [2/3]

◆ NonConstIteratorBase() [3/3]

Member Function Documentation

◆ GetValue()

V& GetValue ( ) const

Returns the value of the current key-value-pair of this iterator.

Returns
Current value of this iterator.

◆ Erase()

ResultOk<void> Erase ( BurstTrieMap 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
False if some allocation failed (for a BurstTrieMap, this is impossible, so this function will always return true).

◆ ChangeKey()

ResultMem ChangeKey ( BurstTrieMap map,
newKey 
)

Modifies the key of the map entry pointed to by this iterator. 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.

This function is not supported when the sorting mode is BURSTTRIE_SORT::NONE.

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