Module: Essential Tools Module Group: STL Extension-based Collection
Does not inherit
#include <rw/tvslist.h> template <class T, class A=std::allocator<T> > class RWTValSlistConstIterator
RWTValSlistConstIterator provides an iterator interface for class RWTValSlist. A const iterator prohibits any changes to the collection over which it iterates.
The order of iteration over an RWTValSlist is dependent on the order of insertion of the values into the container.
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 returns a value equivalent to boolean false. Continued increments return a value equal to false until reset() is called.
The value type must have operator== and operator< defined. This requirement is imposed by the Standard C++ Library.
Creates a const iterator for the singly linked list s. The iterator begins in an undefined state and must be advanced before the first element is accessible
Advances self to the next element. If the iterator has advanced past the last element in the collection, false is returned. Otherwise, true is returned.
Advances self to the next element. If the iterator has been reset or just created, self references the first element. If, before iteration, self referenced the last value in the list, self now references an undefined value distinct from the reset value and false is returned. Otherwise, true is returned. Note: no postincrement operator is provided.
bool operator+=(size_type n);
Behaves as if the operator++ member function had been applied n times
Moves self back to the immediately previous element. If the iterator has been reset or just created, this operator returns false, otherwise it returns true. If self references the the first element, it is now in the reset state. If self has been iterated past the last value in the list, it now references the last item in the list. Note: no postdecrement operator is provided.
bool operator-=(size_type n);
Behaves as if the operator-- member function had been applied n times
const RWTValSlist<T,A>* container() const;
Returns a pointer to the collection being iterated over.
bool findNext(const_reference a);
Advances self to the first element t encountered by iterating forward, such that the expression (t == a) is true. Returns true if an element was found, returns false otherwise.
bool findNext(bool(*fn)(const_reference, void*), void* d);
Advances self to the first element t encountered by iterating forward such that the expression((*fn)(t,d)) is true. fn points to a user-defined tester function which must have prototype:
bool yourTester(const_reference a, void* d);
Client data may be passed through parameter d. Returns true if an element was found, returns false otherwise.
const T& key();
Returns the stored value referenced by self.
void reset(); void reset(RWTValSlist<T,A>& l);
Resets the iterator so that after being advanced it references the first element of the collection. Using reset() with no argument resets the iterator on the current container. Supplying a RWTValSlist to reset() resets the iterator on the new container.
©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks 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.