WvStreams
uninullgen.h
1/* -*- Mode: C++ -*-
2 * Worldvisions Weaver Software:
3 * Copyright (C) 1997-2002 Net Integration Technologies, Inc.
4 *
5 * A generator that is always empty and rejects changes.
6 */
7#ifndef __UNICONFNULL_H
8#define __UNICONFNULL_H
9
10#include "uniconfgen.h"
11
18class UniNullGen : public UniConfGen
19{
20public:
21 UniNullGen() { };
22 virtual ~UniNullGen() { };
23
24 /***** Overridden methods *****/
25
26 virtual void flush_buffers() { }
27 virtual WvString get(const UniConfKey &key) { return WvString::null; }
28 virtual void set(const UniConfKey &key, WvStringParm value) { }
29 virtual void setv(const UniConfPairList &pairs) { }
30 virtual bool haschildren(const UniConfKey &key) { return false; }
31 virtual Iter *iterator(const UniConfKey &key) { return new NullIter(); }
32};
33
34
35#endif // __UNICONFNULL_H
An abstract iterator over keys and values in a generator.
Definition uniconfgen.h:324
An iterator that's always empty.
Definition uniconfgen.h:358
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 generator that is always empty and rejects changes.
Definition uninullgen.h:19
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
Definition uninullgen.h:29
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
Definition uninullgen.h:30
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
Definition uninullgen.h:31
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
Definition uninullgen.h:27
virtual void flush_buffers()
Flushes any commitment/notification buffers .
Definition uninullgen.h:26
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
Definition uninullgen.h:28
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