WvStreams
unitempgen.h
00001 /* -*- Mode: C++ -*-
00002  * Worldvisions Weaver Software:
00003  *   Copyright (C) 2002 Net Integration Technologies, Inc.
00004  *
00005  * A UniConf generator that stores keys in memory.
00006  */
00007 #ifndef __UNITEMPGEN_H
00008 #define __UNITEMPGEN_H
00009 
00010 #include "uniconfgen.h"
00011 #include "uniconftree.h"
00012 #include "wvstringcache.h"
00013 
00020 class UniTempGen : public UniConfGen
00021 {
00022     WvStringCache scache;
00023 
00024 public:
00025     UniConfValueTree *root; 
00026     bool dirty; 
00028     UniTempGen();
00029     virtual ~UniTempGen();
00030 
00031     /***** Overridden members *****/
00032 
00033     virtual WvString get(const UniConfKey &key);
00034     virtual void set(const UniConfKey &key, WvStringParm value);
00035     virtual void setv(const UniConfPairList &pairs);
00036     virtual void flush_buffers() { };
00037     virtual bool haschildren(const UniConfKey &key);
00038     virtual Iter *iterator(const UniConfKey &key);
00039     virtual void commit();
00040     virtual bool refresh();
00041 
00042 protected:
00043     void notify_deleted(const UniConfValueTree *node, void *);
00044 };
00045 
00046 
00047 #endif // __UNITEMPGEN_H