WvStreams
include/unitempgen.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 2002 Net Integration Technologies, Inc.
4 *
5 * A UniConf generator that stores keys in memory.
6 */
7#ifndef __UNITEMPGEN_H
8#define __UNITEMPGEN_H
9
10#include "uniconfgen.h"
11#include "uniconftree.h"
12#include "wvstringcache.h"
13
20class UniTempGen : public UniConfGen
21{
22 WvStringCache scache;
23
24public:
26 bool dirty;
28 UniTempGen();
29 virtual ~UniTempGen();
30
31 /***** Overridden members *****/
32
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();
41
42protected:
43 void notify_deleted(const UniConfValueTree *node, void *);
44};
45
46
47#endif // __UNITEMPGEN_H
An abstract iterator over keys and values in a generator.
A default implementation of IUniConfGen, providing various handy features that save trouble when impl...
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
A plain UniConfTree that holds keys and values.
A UniConf generator that stores keys in memory.
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
virtual void commit()
Commits any changes.
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
virtual void flush_buffers()
Flushes any commitment/notification buffers .
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
virtual bool refresh()
Refreshes information about a key recursively.
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
WvString is an implementation of a simple and efficient printable-string class.