WvStreams
uniwvconfgen.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 2002 Net Integration Technologies, Inc.
4 *
5 * A generator to make a UniConf object out of a WvConf.
6 */
7
8#ifndef __UNICONFWVGEN_H
9#define __UNICONFWVGEN_H
10
11#include "uniconfgen.h"
12
13class WvConf;
18{
19private:
20 UniConfKey *tempkey;
21 WvString tempvalue;
22
23 void notify(void *userdata, WvStringParm section, WvStringParm entry,
24 WvStringParm oldval, WvStringParm newval);
25
26protected:
27 WvConf *cfg;
28
29 class WvConfIter;
30
31public:
32 UniWvConfGen(WvConf *_cfg);
34
35 /***** Overridden members *****/
36
37 virtual void flush_buffers() { }
38 virtual WvString get(const UniConfKey &key);
39 virtual void set(const UniConfKey &key, WvStringParm value);
40 virtual void setv(const UniConfPairList &pairs);
41 virtual bool haschildren(const UniConfKey &key);
42 virtual Iter *iterator(const UniConfKey &key);
43};
44
45#endif //__UNICONFWVGEN_H
A default implementation of IUniConfGen, providing various handy features that save trouble when impl...
Definition: uniconfgen.h:200
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
Definition: uniconfkey.h:39
A wrapper class for the wvconf iters to provide a UniConfGen iter.
Definition: uniwvconfgen.cc:15
A UniConf generator for backwards compatibility with WvConf.
Definition: uniwvconfgen.h:18
virtual void flush_buffers()
Flushes any commitment/notification buffers .
Definition: uniwvconfgen.h:37
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
Definition: uniwvconfgen.cc:95
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
Definition: uniwvconfgen.cc:67
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
Definition: uniwvconfgen.cc:89
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
Definition: uniwvconfgen.cc:76
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
WvConf configuration file management class: used to read/write config files that are formatted in the...
Definition: wvconf.h:105
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
Definition: wvstring.h:94
WvString is an implementation of a simple and efficient printable-string class.
Definition: wvstring.h:330