ArrayMap< K, V, SORTED, COMPARE, ARRAY >::IteratorTemplate< CONSTITERATOR, SUPER > Class Template Reference

#include <arraymap.h>

Inheritance diagram for ArrayMap< K, V, SORTED, COMPARE, ARRAY >::IteratorTemplate< CONSTITERATOR, SUPER >:

Detailed Description

template<typename K, typename V, Bool SORTED = true, typename COMPARE = DefaultCompare, typename ARRAY = BaseArraySelector<>>
template<Bool CONSTITERATOR, template< Bool > class SUPER>
class maxon::ArrayMap< K, V, SORTED, COMPARE, ARRAY >::IteratorTemplate< CONSTITERATOR, SUPER >

Iterator implementation for ArrayMap. Besides the usual iterator operations, ArrayMap iterators support the foreach protocol and Erase and ChangeKey functions. For a sorted ArrayMap, the iterator will point to the map entries in ascending order of the keys if you use ++ on the iterator.

Public Types

using Super = ForEachIterator< IteratorTemplate< CONSTITERATOR, SUPER >, SUPER< CONSTITERATOR > >
 
- Public Types inherited from ForEachIterator< IteratorTemplate< CONSTITERATOR, SUPER >, SUPER< CONSTITERATOR > >
using IsForEachIterator = std::true_type
 

Public Member Functions

 IteratorTemplate ()
 
 IteratorTemplate (typename Super::CollectionType &m, Int s=0)
 
 IteratorTemplate (const IteratorTemplate &src)
 
 MAXON_OPERATOR_COPY_ASSIGNMENT (IteratorTemplate)
 
template<Bool C, template< Bool > class S, typename = typename std::enable_if<!CONSTITERATOR || C>::type>
 operator IteratorTemplate< C, S > & ()
 
IteratorTemplateoperator++ ()
 
IteratorTemplateoperator-- ()
 
void operator++ (int)
 
void operator-- (int)
 
- Public Member Functions inherited from ForEachIterator< IteratorTemplate< CONSTITERATOR, SUPER >, SUPER< CONSTITERATOR > >
MAXON_ATTRIBUTE_FORCE_INLINE ForEachIterator (ARGS &&... args)
 
String ToString (const FormatStatement *formatStatement=nullptr)
 
IteratorTemplate< CONSTITERATOR, SUPER > & Find (const T &v)
 
Int FindIndex (const T &v)
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool Contains (const T &v)
 
MAXON_ATTRIBUTE_FORCE_INLINE Wrapper begin ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ForEachIterator< IteratorTemplate< CONSTITERATOR, SUPER >, SUPER< CONSTITERATOR > >
static MAXON_ATTRIBUTE_FORCE_INLINE PRIVATE_MAXON_RBF_SENTINEL (Wrapper) end()
 

Member Typedef Documentation

◆ Super

using Super = ForEachIterator<IteratorTemplate<CONSTITERATOR, SUPER>, SUPER<CONSTITERATOR> >

Constructor & Destructor Documentation

◆ IteratorTemplate() [1/3]

◆ IteratorTemplate() [2/3]

IteratorTemplate ( typename Super::CollectionType &  m,
Int  s = 0 
)
explicit

◆ IteratorTemplate() [3/3]

IteratorTemplate ( const IteratorTemplate< CONSTITERATOR, SUPER > &  src)

Member Function Documentation

◆ MAXON_OPERATOR_COPY_ASSIGNMENT()

MAXON_OPERATOR_COPY_ASSIGNMENT ( IteratorTemplate< CONSTITERATOR, SUPER >  )

◆ operator IteratorTemplate< C, S > &()

operator IteratorTemplate< C, S > & ( )

◆ operator++() [1/2]

IteratorTemplate& operator++ ( )

◆ operator--() [1/2]

IteratorTemplate& operator-- ( )

◆ operator++() [2/2]

void operator++ ( int  )

◆ operator--() [2/2]

void operator-- ( int  )