Make WvStreams compile with gcc 4.4.
[wvstreams.git] / include / unitempgen.h
blob38076a234ea11a5920029c76dd4aec346e07de7f
1 /* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 2002 Net Integration Technologies, Inc.
5 * A UniConf generator that stores keys in memory.
6 */
7 #ifndef __UNITEMPGEN_H
8 #define __UNITEMPGEN_H
10 #include "uniconfgen.h"
11 #include "uniconftree.h"
12 #include "wvstringcache.h"
14 /**
15 * A UniConf generator that stores keys in memory.
17 * Maintains a dirtyness indicator that is set whenever the contents
18 * are changed. Also dispatches notifications on such changes.
20 class UniTempGen : public UniConfGen
22 WvStringCache scache;
24 public:
25 UniConfValueTree *root; /*!< the root of the tree */
26 bool dirty; /*!< set whenever the tree actually changes */
28 UniTempGen();
29 virtual ~UniTempGen();
31 /***** Overridden members *****/
33 virtual WvString get(const UniConfKey &key);
34 virtual void set(const UniConfKey &key, WvStringParm value);
35 virtual void setv(const UniConfPairList &pairs);
36 virtual void flush_buffers() { };
37 virtual bool haschildren(const UniConfKey &key);
38 virtual Iter *iterator(const UniConfKey &key);
39 virtual void commit();
40 virtual bool refresh();
42 protected:
43 void notify_deleted(const UniConfValueTree *node, void *);
47 #endif // __UNITEMPGEN_H