HybridMap< K, V, SMALL, LARGE, THRESHOLD, REVERSE_THRESHOLD >::IteratorBase< CONSTITERATOR > Class Template Reference

#include <hybridmap.h>

Public Types

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

 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
 

Protected Member Functions

SmallIteratorGetSmall ()
 
LargeIteratorGetLarge ()
 
const SmallIteratorGetSmall () const
 
const LargeIteratorGetLarge () const
 

Protected Attributes

Bool _small
 
std::aligned_union< 0, SmallIterator, LargeIterator >::type _union [1]
 

Friends

class HybridMap
 

Member Typedef Documentation

◆ SmallIterator

using SmallIterator = typename std::conditional<CONSTITERATOR, typename SmallType::ConstIterator, typename SmallType::Iterator>::type

◆ LargeIterator

using LargeIterator = typename std::conditional<CONSTITERATOR, typename LargeType::ConstIterator, typename LargeType::Iterator>::type

◆ CollectionType

using CollectionType = typename ConstIf<HybridMap, CONSTITERATOR>::type

Constructor & Destructor Documentation

◆ IteratorBase() [1/5]

◆ IteratorBase() [2/5]

IteratorBase ( const SmallIterator src)
explicit

◆ IteratorBase() [3/5]

IteratorBase ( const LargeIterator src)
explicit

◆ IteratorBase() [4/5]

IteratorBase ( const IteratorBase< CONSTITERATOR > &  src)

◆ IteratorBase() [5/5]

IteratorBase ( CollectionType m,
Int  s 
)

◆ ~IteratorBase()

Member Function Documentation

◆ operator++()

void operator++ ( )

◆ operator--()

void operator-- ( )

◆ operator Bool()

operator Bool ( ) const
explicit

◆ GetKey()

const K& GetKey ( ) const

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

Returns
Current key of this iterator.

◆ GetValue()

ConstIf<V, CONSTITERATOR>::type& GetValue ( void  ) const

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

Returns
Current value of this iterator.

◆ operator==()

Bool operator== ( const IteratorBase< CONSTITERATOR > &  b) const

◆ operator!=()

Bool operator!= ( const IteratorBase< CONSTITERATOR > &  b) const

◆ GetSmall() [1/2]

SmallIterator& GetSmall ( )
protected

◆ GetLarge() [1/2]

LargeIterator& GetLarge ( )
protected

◆ GetSmall() [2/2]

const SmallIterator& GetSmall ( ) const
protected

◆ GetLarge() [2/2]

const LargeIterator& GetLarge ( ) const
protected

Friends And Related Function Documentation

◆ HybridMap

friend class HybridMap
friend

Member Data Documentation

◆ _small

Bool _small
protected

◆ _union

std::aligned_union<0, SmallIterator, LargeIterator>::type _union[1]
protected