Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

unilistgen.h

00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 1997-2002 Net Integration Technologies, Inc.
00004  * 
00005  * UniListGen is a UniConf generator to allow multiple generators to be
00006  * stacked in a priority sequence for get/set/etc.
00007  *
00008  */
00009 
00010 #ifndef __UNICONFLISTGEN_H
00011 #define __UNICONFLISTGEN_H
00012 
00013 #include "uniconfgen.h"
00014 #include "wvscatterhash.h"
00015 
00016 /*
00017  * Accepts a list of UniConf generators, and stacks them, treating them as one
00018  * uniconf source.
00019  *
00020  * The standard way of using the list generator would be with a moniker. The
00021  * moniker takes the form of list:(tcl style string list).
00022  *
00023  * For example: list:readonly:ini:admin.ini ini:user.ini
00024  *
00025  * The list can also contain a list. This still uses tcl style string lists as
00026  * follows:
00027  *
00028  * list:readonly:ini:admin.ini list:{ini:user1.ini ini:user2.ini} ini:def.ini
00029  */
00030 class UniListGen : public UniConfGen
00031 {
00032 public:
00033     UniListGen(UniConfGenList *_l);
00034     virtual UniListGen::~UniListGen() { delete l; }
00035 
00036     UniConfGenList *l;
00037     UniConfGenList::Iter i;
00038 
00039     /***** Overridden members *****/
00040 
00041     virtual void commit(); 
00042     virtual bool refresh();
00043     virtual void flush_buffers() { }
00044     virtual WvString get(const UniConfKey &key);
00045     virtual void set(const UniConfKey &key, WvStringParm value);
00046     virtual bool exists(const UniConfKey &key);
00047     virtual bool haschildren(const UniConfKey &key);
00048     virtual bool isok();
00049     virtual Iter *iterator(const UniConfKey &key);
00050 
00051     class IterIter;
00052 
00053 protected:
00058     virtual void gencallback(const UniConfKey &key, WvStringParm value, 
00059                                 void *userdata);
00060 };
00061 
00062 
00063 #endif // __UNICONFLISTGEN_H

Generated on Sun Jul 10 14:05:51 2005 for WvStreams by  doxygen 1.4.0