2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
5 * UniListGen is a UniConf generator to allow multiple generators to be
6 * stacked in a priority sequence for get/set/etc.
10 #ifndef __UNICONFLISTGEN_H
11 #define __UNICONFLISTGEN_H
13 #include "uniconfgen.h"
14 #include "wvscatterhash.h"
17 * Accepts a list of UniConf generators, and stacks them, treating them as one
20 * The standard way of using the list generator would be with a moniker. The
21 * moniker takes the form of list:(tcl style string list).
23 * For example: list:readonly:ini:admin.ini ini:user.ini
25 * The list can also contain a list. This still uses tcl style string lists as
28 * list:readonly:ini:admin.ini list:{ini:user1.ini ini:user2.ini} ini:def.ini
30 class UniListGen
: public UniConfGen
33 UniListGen(UniConfGenList
*_l
);
34 virtual ~UniListGen();
38 /***** Overridden members *****/
40 virtual void commit();
41 virtual bool refresh();
42 virtual void flush_buffers() { }
43 virtual WvString
get(const UniConfKey
&key
);
44 virtual void set(const UniConfKey
&key
, WvStringParm value
);
45 virtual void setv(const UniConfPairList
&pairs
);
46 virtual bool exists(const UniConfKey
&key
);
47 virtual bool haschildren(const UniConfKey
&key
);
49 virtual Iter
*iterator(const UniConfKey
&key
);
55 * Called by first generator when a key changes.
56 * The default implementation calls delta(key).
58 virtual void gencallback(const UniConfKey
&key
, WvStringParm value
);
62 #endif // __UNICONFLISTGEN_H