ArrayMap< K, V, SORTED, COMPARE, ARRAY >::NonConstIteratorBase Class Reference

#include <arraymap.h>

Inheritance diagram for ArrayMap< K, V, SORTED, COMPARE, ARRAY >::NonConstIteratorBase:

Public Types

using Super = AutoIterator< ArrayType >
 
- Public Types inherited from AutoIterator< ArrayType >
using Iterator = typename GetIteratorType< ArrayType >::type
 
using CollectionType = typename GetCollectionType< ArrayType >::type
 
using ValueType = decltype(*std::declval< Iterator >())
 
using ResultFunctions = ResultIteratorFunctions< SUPER >
 
using InvConstAutoIterator = AutoIterator< typename ConstIf< typename std::remove_const< ArrayType >::type, !STD_IS_REPLACEMENT(const, ArrayType)>::type >
 
- Public Types inherited from ForEachIterator< ITERATOR, SUPER >
using IsForEachIterator = std::true_type
 

Public Member Functions

 NonConstIteratorBase ()
 
 NonConstIteratorBase (ArrayMap &m, Int s)
 
 NonConstIteratorBase (const NonConstIteratorBase &src)
 
ResultOk< void > Erase (ArrayMap &map, Int eraseCnt=1)
 
ResultOk< void > ChangeKey (ArrayMap &map, const K &newKey)
 
- Public Member Functions inherited from AutoIterator< ArrayType >
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator (CollectionType &collection)
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator (const Iterator &s, const Iterator &e)
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator (CollectionType &collection, Int s, Int e=InvalidArrayIndex)
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator (AutoIterator &&src)
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator (const AutoIterator &src)
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator ()
 
 MAXON_OPERATOR_MOVE_ASSIGNMENT (AutoIterator)
 
 MAXON_OPERATOR_COPY_ASSIGNMENT (AutoIterator)
 
MAXON_ATTRIBUTE_FORCE_INLINE operator Bool () const
 
MAXON_ATTRIBUTE_FORCE_INLINE ValueType operator* () const
 
MAXON_ATTRIBUTE_FORCE_INLINE std::remove_reference< ValueType >::typeoperator-> () const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator== (const AutoIterator &b) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator== (const InvConstAutoIterator &b) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator< (const AutoIterator &b) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Bool operator< (const InvConstAutoIterator &b) const
 
 MAXON_OPERATOR_COMPARISON (AutoIterator)
 
 MAXON_OPERATOR_COMPARISON (InvConstAutoIterator)
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIteratoroperator++ ()
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator operator++ (int)
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIteratoroperator+= (Int i)
 
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator operator+ (Int i) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Int operator- (const AutoIterator &b) const
 
MAXON_ATTRIBUTE_FORCE_INLINE Int operator- (const Iterator &b) const
 
MAXON_ATTRIBUTE_FORCE_INLINE void Erase (CollectionType &collection)
 
MAXON_ATTRIBUTE_FORCE_INLINE operator Iterator & ()
 
MAXON_ATTRIBUTE_FORCE_INLINE IteratorGetIterator ()
 
- Public Member Functions inherited from ForEachIterator< ITERATOR, SUPER >
template<typename... ARGS>
MAXON_ATTRIBUTE_FORCE_INLINE ForEachIterator (ARGS &&... args)
 
String ToString (const FormatStatement *formatStatement=nullptr)
 
template<typename T >
ITERATOR & Find (const T &v)
 
template<typename T >
Int FindIndex (const T &v)
 
template<typename T >
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< ITERATOR, SUPER >
static MAXON_ATTRIBUTE_FORCE_INLINE PRIVATE_MAXON_RBF_SENTINEL (Wrapper) end()
 
- Protected Member Functions inherited from AutoIterator< ArrayType >
MAXON_ATTRIBUTE_FORCE_INLINE AutoIterator (const Iterator &s, const Iterator &e, Bool removed)
 
- Protected Attributes inherited from AutoIterator< ArrayType >
Iterator _it
 
Iterator _end
 

Member Typedef Documentation

◆ Super

Constructor & Destructor Documentation

◆ NonConstIteratorBase() [1/3]

◆ NonConstIteratorBase() [2/3]

NonConstIteratorBase ( ArrayMap m,
Int  s 
)

◆ NonConstIteratorBase() [3/3]

Member Function Documentation

◆ Erase()

ResultOk<void> Erase ( ArrayMap 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 an ArrayMap, this is impossible, so this function will always return true).

◆ ChangeKey()

ResultOk<void> ChangeKey ( ArrayMap map,
const K &  newKey 
)

Modifies the key of the map entry pointed to by this iterator. This operation is only supported by sorted array maps. 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 (for an ArrayMap, this is impossible, so this function will always return true).