template class Core::ListIterator

Overview

List iterator. More…

#include <corelinkedlist.h>

template <class T>
class ListIterator
{
public:
    // construction

    ListIterator (const LinkedList <T>& list);

    // methods

    bool done () const;
    void first ();
    void last ();
    T& next ();
    T& previous ();
    T& peekNext () const;
    bool operator == (const ListIterator& other) const;
    bool operator != (const ListIterator& other) const;
};

Detailed Documentation

List iterator.

Methods

bool done () const

Check if iteration is done.

void first ()

Seek to first element.

void last ()

Seek to last element.

T& next ()

Seek and return next element.

T& previous ()

Seek and return previous element.

T& peekNext () const

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