Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Hydra Core Library Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::ListIterator<T>

Group:  General

Local Index

Members

Header File

#include <rwsf/core/List.h>

Description

rwsf::ListIterator<T> provides an iterator interface to class std::list.

The order of iteration over an rwsf::ListIterator<T> is dependent on the order of insertion of the values into the Agent.

The current item referenced by this iterator is undefined after construction or after a call to reset(). The iterator becomes valid after being advanced with either a preincrement or operator().

For both operator++ and operator(), iterating past the last element will return a value equivalent to boolean false. Continued increments will return a value equal to false until reset() is called.

The value type must have operator== and operator< defined.

Example

Program Output

Public Constructors

ListIterator(List<T>& s); 
ListIterator(const ListIterator<T>&);

Public Member Operators

bool
operator()();
bool
operator++();
bool
operator+=(size_t n); 

Public Member Functions

List<T>*
container() const; 
bool
findNext(const T& a); 
bool
findNext(bool(*testFun)(const T&, void*), void* d);
void
insertAfterPoint(const T& a); 
T&
key() const;
bool
remove();
bool
removeNext(const T& a); 
bool
removeNext(bool(*testFun)(const T&, void*), void* d);
void
reset();
void
reset(List<T>& s);

Resets the iterator so that after being advanced it will reference the first element of the collection. Using reset() with no argument will reset the iterator on the current Agent. Supplying an std::list to reset() will reset the iterator on the new Agent.



Previous fileTop of DocumentContentsIndex pageNext file

©2004-2007 Copyright Quovadx, Inc. All Rights Reserved.
Quovadx and Rogue Wave are registered trademarks and HydraSDO is a trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.