#include <uniconfgen.h>
Inheritance diagram for UniConfGen::ListIter:
This is handy if you know the list of keys is relatively short, and you don't want to write your own iterator and/or you know your own object state might change during iteration, so you would have to pregenerate the list of keys anyway.
The creator of the iter is responsible for filling the 'keys' and 'values' lists. If the 'values' list runs out of values before 'keys', the remaining values will be retrieved from the given generator instead.
Public Member Functions | |
ListIter (IUniConfGen *_gen) | |
virtual void | rewind () |
Rewinds the iterator. | |
virtual bool | next () |
Seeks to the next element in the sequence. | |
virtual UniConfKey | key () const |
Returns the current key. | |
virtual WvString | value () const |
Returns the value of the current key. | |
Public Attributes | |
IUniConfGen * | gen |
WvList< WvString > | keys |
WvList< WvString > | values |
WvList< WvString >::Iter | ki |
WvList< WvString >::Iter | vi |
|
Rewinds the iterator. Must be called prior to the first invocation of next(). Implements UniConfGen::Iter. |
|
Seeks to the next element in the sequence. Returns true if that element exists. Must be called prior to the first invocation of key(). Implements UniConfGen::Iter. |
|
Returns the value of the current key. You could just do a get(), but maybe your generator has a more efficient way. Implements UniConfGen::Iter. |