template class Core::HashMapIterator

Overview

Hash map iterator. More…

#include <corehashmap.h>

template <class TKey, class TValue>
class HashMapIterator
{
public:
    // typedefs

    typedef HashMap<TKey, TValue>::TAssociation Association;

    // construction

    HashMapIterator(const HashMap<TKey, TValue>& map);

    // methods

    bool done() const;
    void first();
    void last();
    const Association& nextAssociation();
    const Association& previousAssociation();
    const TValue& next();
    const TValue& previous();
    const TValue& peekNext();
    bool operator == (const HashMapIterator<TKey, TValue>& other) const;
    bool operator != (const HashMapIterator<TKey, TValue>& other) const;
};

Detailed Documentation

Hash map iterator.

Methods

bool done() const

Check if iteration is done.

void first()

Seek to first element.

void last()

Seek to last element.

const Association& nextAssociation()

Seek and return next key/value pair.

const Association& previousAssociation()

Seek and return previous key/value pair.

const TValue& next()

Seek and return next value.

const TValue& previous()

Seek and return previous value.

const TValue& peekNext()

Peek at next value (but don’t seek).