WvVector< T >::Iter Class Reference

#include <wvvector.h>

List of all members.


Detailed Description

template<class T>
class WvVector< T >::Iter

A simple iterator that walks through all elements in the list.

Definition at line 350 of file wvvector.h.

Public Member Functions

 Iter (const WvVector &v)
 Binds the iterator to the specified vector.
T * ptr () const
 Returns a pointer to the current element.
 WvIterStuff (T)
bool get_autofree () const
 Returns the state of autofree for the current element.
void set_autofree (bool autofree)
 Sets the state of autofree for the current element.
void remove (bool destroy=true)
 Remove the current element from the vector and automatically increments the iterator to point to the next element as if next() had been called.
void xremove (bool destroy=true)
 Removes the current element from the vector but unlike remove() automatically returns the iterator to the previous item in the vector such that next() must be called to obtain the next element.


Member Function Documentation

template<class T>
void WvVector< T >::Iter::xremove ( bool  destroy = true  )  [inline]

Removes the current element from the vector but unlike remove() automatically returns the iterator to the previous item in the vector such that next() must be called to obtain the next element.

This version allows for writing neater loop structures since an element can be removed in mid-traversal while still allowing the iterator to be incremented at the top of the loop as usual.

Calling xremove() twice in a row is currently unsupported.

Definition at line 405 of file wvvector.h.


The documentation for this class was generated from the following file:
Generated on Wed Jul 12 17:53:39 2006 for WvStreams by  doxygen 1.4.7