Click on the banner to return to the Class Reference home page.
Return to the Appendix home page.

©Copyright 1996 Rogue Wave Software

RWTPtrDlistIterator<T>

Alternate template: Standard C++ Library not required

Synopsis

#include <rw/tpdlist.h>
RWTPtrDlist<T> list;
RWTPtrDlistIterator<T> iterator(list);

Please Note!


If you do not have the Standard C++ Library, use the interface described here. Otherwise, use the interface to RWTPtrDlistIterator described in the Class Reference.



Description

Iterator for class RWTPtrDlist<T>, allowing sequential access to all the elements of a doubly-linked parameterized list. Elements are accessed in order, in either direction.

Like all Rogue Wave iterators, the "current item" is undefined immediately after construction -- you must define it by using operator() or some other (valid) operation.

Once the iterator has advanced beyond the end of the collection it is no longer valid -- continuing to use it will bring undefined results.

Persistence

None

Public Constructor

RWTPtrDlistIterator<T>(RWTPtrDlist<T>& c);

Public Member Operators

RWBoolean
operator++();
RWBoolean
operator--();
RWBoolean
operator+=(size_t n);
RWBoolean
operator-=(size_t n);
T*
operator()();

Public Member Functions

RWTPtrDlist<T>*
container() const;
T*
findNext(const T* a);
T*
findNext(RWBoolean (*testFun)(T*, void*), void*);
void
insertAfterPoint(T* a);
T*
key() const;
T*
remove();
T*
removeNext(const T* a);
T*
removeNext(RWBoolean (*testFun)(T*, void*), void*);
void
reset();
void
reset(RWTPtrDlist<T>& c);