OpenShot Library | OpenShotAudio 0.2.2
|
Iterates over the items in a HashMap. More...
#include <juce_HashMap.h>
Public Member Functions | |
Iterator (const HashMap &hashMapToIterate) noexcept | |
Iterator (const Iterator &other) noexcept | |
bool | next () noexcept |
Moves to the next item, if one is available. More... | |
KeyType | getKey () const |
Returns the current item's key. More... | |
ValueType | getValue () const |
Returns the current item's value. More... | |
void | reset () noexcept |
Resets the iterator to its starting position. More... | |
Iterator & | operator++ () noexcept |
ValueType | operator* () const |
bool | operator!= (const Iterator &other) const noexcept |
void | resetToEnd () noexcept |
Iterates over the items in a HashMap.
To use it, repeatedly call next() until it returns false, e.g.
The order in which items are iterated bears no resemblance to the order in which they were originally added!
Obviously as soon as you call any non-const methods on the original hash-map, any iterators that were created beforehand will cease to be valid, and should not be used.
Definition at line 403 of file juce_HashMap.h.
|
inlinenoexcept |
Definition at line 405 of file juce_HashMap.h.
|
inlinenoexcept |
Definition at line 409 of file juce_HashMap.h.
|
inlinenoexcept |
Moves to the next item, if one is available.
When this returns true, you can get the item's key and value using getKey() and getValue(). If it returns false, the iteration has finished and you should stop.
Definition at line 417 of file juce_HashMap.h.
References juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::getNumSlots(), and juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::getUnchecked().
Referenced by juce::HashMap< KeyType, ValueType, HashFunctionType, TypeOfCriticalSectionToUse >::begin().
|
inline |
Returns the current item's key.
This should only be called when a call to next() has just returned true.
Definition at line 436 of file juce_HashMap.h.
|
inline |
Returns the current item's value.
This should only be called when a call to next() has just returned true.
Definition at line 444 of file juce_HashMap.h.
|
inlinenoexcept |
Resets the iterator to its starting position.
Definition at line 450 of file juce_HashMap.h.
|
inlinenoexcept |
Definition at line 456 of file juce_HashMap.h.
|
inline |
Definition at line 457 of file juce_HashMap.h.
|
inlinenoexcept |
Definition at line 458 of file juce_HashMap.h.
|
inlinenoexcept |
Definition at line 459 of file juce_HashMap.h.