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 
18 class UniNullGen : public UniConfGen
19 {
20 public:
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
UniNullGen::iterator
virtual Iter * iterator(const UniConfKey &key)
Returns an iterator over the children of the specified key.
Definition: uninullgen.h:31
UniNullGen
A generator that is always empty and rejects changes.
Definition: uninullgen.h:18
UniNullGen::setv
virtual void setv(const UniConfPairList &pairs)
Stores multiple key-value pairs into the registry.
Definition: uninullgen.h:29
WvString
WvString is an implementation of a simple and efficient printable-string class.
Definition: wvstring.h:329
UniNullGen::get
virtual WvString get(const UniConfKey &key)
Fetches a string value for a key from the registry.
Definition: uninullgen.h:27
UniConfKey
Represents a UniConf key which is a path in a hierarchy structured much like the traditional Unix fil...
Definition: uniconfkey.h:38
UniNullGen::set
virtual void set(const UniConfKey &key, WvStringParm value)
Stores a string value for a key into the registry.
Definition: uninullgen.h:28
UniConfGen
A default implementation of IUniConfGen, providing various handy features that save trouble when impl...
Definition: uniconfgen.h:199
UniNullGen::flush_buffers
virtual void flush_buffers()
Flushes any commitment/notification buffers .
Definition: uninullgen.h:26
UniConfGen::NullIter
An iterator that's always empty.
Definition: uniconfgen.h:357
UniNullGen::haschildren
virtual bool haschildren(const UniConfKey &key)
Returns true if a key has children.
Definition: uninullgen.h:30
UniConfGen::Iter
An abstract iterator over keys and values in a generator.
Definition: uniconfgen.h:323