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

公共成员函数

  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 >::type &  GetValue () const
Bool   operator== (const IteratorBase &b) const
Bool   operator!= (const IteratorBase &b) const

Protected Member Functions

SmallIterator GetSmall ()
LargeIterator GetLarge ()
const SmallIterator GetSmall () const
const LargeIterator GetLarge () const

Protected Attributes

Bool   _small
std::aligned_union2 < 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

构造函数 & 析构函数文档编制

◆  IteratorBase() [1/5]

IteratorBase ( )

◆  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()

~ IteratorBase ( )

成员函数文档编制

◆  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.

返回
Current key of this iterator.

◆  GetValue()

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

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

返回
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_union2 <0, SmallIterator , LargeIterator >::type _union[1]
protected