WvVectorBase::IterBase Class Reference

List of all members.

Detailed Description

Definition at line 127 of file wvvector.h.

Public Member Functions

 IterBase (const WvVectorBase &v)
 Binds the iterator to the specified vector.
void rewind ()
 Rewinds the iterator to make it point to an imaginary element preceeding the first element of the vector.
void unwind ()
 Unwinds the iterator to make it point to the last element of the vector.
WvLinknext ()
 Moves the iterator along the vector to point ot the next element.
WvLinkprev ()
 Moves the iterator along the vector to point ot the next element.
WvLinkcur () const
 Returns a pointer to the current WvLink at the iterator's current location.
WvLinkfind (const void *data)
 Rewinds the iterator and repositions it over the element that matches the specified value.
WvLinkfind_next (const void *data)
 Repositions the iterator over the element that matches the specified value.

Protected Attributes

const WvVectorBasevec
int i
WvLinklink

Friends

class WvVectorBase


Member Function Documentation

WvLink* WvVectorBase::IterBase::next (  )  [inline]

Moves the iterator along the vector to point ot the next element.

If the iterator had just been rewound, it now points to the first element of the list.

Returns: the current WvLink pointer, or null if there were no more elements remaining in the traversal sequence

Definition at line 174 of file wvvector.h.

References i, link, vec, WvVectorBase::xcount, and WvVectorBase::xseq.

Referenced by find(), and find_next().

WvLink* WvVectorBase::IterBase::prev (  )  [inline]

Moves the iterator along the vector to point ot the next element.

Returns: the current WvLink pointer, or null if there were no more elements remaining in the traversal sequence

Definition at line 191 of file wvvector.h.

References i, vec, and WvVectorBase::xseq.

WvLink* WvVectorBase::IterBase::cur (  )  const [inline]

Returns a pointer to the current WvLink at the iterator's current location.

Returns: the current WvLink pointer, or null if there were no more elements remain.

Definition at line 206 of file wvvector.h.

References link.

WvLink * WvVectorBase::IterBase::find ( const void *  data  ) 

Rewinds the iterator and repositions it over the element that matches the specified value.

Uses pointer equality (object identity) as the criteria for finding the matching element.

In order to locate multiple matching elements, first call find() and then use find_next().

Returns: the current WvLink pointer, or null if no such element was found

Definition at line 72 of file wvvector.cc.

References WvLink::data, link, next(), and rewind().

WvLink * WvVectorBase::IterBase::find_next ( const void *  data  ) 

Repositions the iterator over the element that matches the specified value.

Uses pointer equality (object identity) as the criteria for finding the matching element.

Returns: the current WvLink pointer, or null if no such element was found

Definition at line 82 of file wvvector.cc.

References WvLink::data, link, and next().


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