WvStreams
include/unilistgen.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 * UniListGen is a UniConf generator to allow multiple generators to be
6 * stacked in a priority sequence for get/set/etc.
7 *
8 */
9
10#ifndef __UNICONFLISTGEN_H
11#define __UNICONFLISTGEN_H
12
13#include "uniconfgen.h"
14#include "wvscatterhash.h"
15
30class UniListGen : public UniConfGen
31{
32public:
33 UniListGen(UniConfGenList *_l);
34 virtual ~UniListGen();
35
36 UniConfGenList *l;
37
38 /***** Overridden members *****/
39
40 virtual void commit();
41 virtual bool refresh();
42 virtual void flush_buffers() { }
43 virtual WvString get(const UniConfKey &key);
44 virtual void set(const UniConfKey &key, WvStringParm value);
45 virtual void setv(const UniConfPairList &pairs);
46 virtual bool exists(const UniConfKey &key);
47 virtual bool haschildren(const UniConfKey &key);
48 virtual bool isok();
49 virtual Iter *iterator(const UniConfKey &key);
50
51 class IterIter;
52
53protected:
58 virtual void gencallback(const UniConfKey &key, WvStringParm value);
59};
60
61
62#endif // __UNICONFLISTGEN_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...
Accepts a list of UniConf generators, and stacks them, treating them as one uniconf source.
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
virtual void flush_buffers()
Flushes any commitment/notification buffers .
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 commit()
Commits any changes.
virtual bool isok()
Determines if the generator is usable and working properly.
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
virtual bool exists(const UniConfKey &key)
Without fetching its value, returns true if a key exists.
virtual void gencallback(const UniConfKey &key, WvStringParm value)
Called by first generator when a key changes.
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.