WvStreams
unilistiter.h
1 /* -*- Mode: C++ -*-
2  * Worldvisions Weaver Software:
3  * Copyright (C) 2002-2005 Net Integration Technologies, Inc.
4  *
5  * A simple implementation of a UniConfGen iterator.
6  */
7 #ifndef __UNILISTITER_H
8 #define __UNILISTITER_H
9 
10 #include "uniconfgen.h"
11 #include "wvscatterhash.h"
12 #include "wvstringcache.h"
13 #include "wvstringlist.h"
14 
28 {
29  IUniConfGen *gen;
30 
31  DeclareWvScatterTable(UniConfKey);
32  UniConfKeyTable keylook;
33 
34 
35  UniConfKeyList keys;
36  WvStringList values;
37 
38  UniConfKeyList::Iter ki;
39  WvStringList::Iter vi;
40 
41  WvStringCache scache;
42 
43 public:
44  UniListIter(IUniConfGen *_gen);
45 
54  void add(const UniConfKey &k, WvStringParm v = WvString::null);
55 
65  void autofill(IUniConfGen::Iter *source);
66 
67  /***** Overridden members *****/
68  virtual void rewind();
69  virtual bool next();
70  virtual UniConfKey key() const;
71  virtual WvString value() const;
72 };
73 
74 #endif // __UNILISTITER_H