WvStreams
unifiltergen.h
1 /* -*- Mode: C++ -*-
2  * Worldvisions Weaver Software:
3  * Copyright (C) 2002 Net Integration Technologies, Inc.
4  *
5  * A UniConfGen framework to simplify writing filtering generators.
6  */
7 #ifndef __UNIFILTERGEN_H
8 #define __UNIFILTERGEN_H
9 
10 #include "uniconfgen.h"
11 
17 class UniFilterGen : public UniConfGen
18 {
19  IUniConfGen *xinner;
20 
21 protected:
23  virtual ~UniFilterGen();
24 
29  void setinner(IUniConfGen *inner);
30 
31 public:
33  IUniConfGen *inner() const
34  { return xinner; }
35 
47  virtual bool keymap(const UniConfKey &unmapped_key, UniConfKey &mapped_key);
48 
56  virtual bool reversekeymap(const UniConfKey &mapped_key, UniConfKey &unmapped_key);
57 
58 
59  /***** Overridden methods *****/
60 
61  virtual void commit();
62  virtual bool refresh();
63  virtual void flush_buffers();
64  virtual void prefetch(const UniConfKey &key, bool recursive);
65  virtual WvString get(const UniConfKey &key);
66  virtual void set(const UniConfKey &key, WvStringParm value);
67  virtual void setv(const UniConfPairList &pairs);
68  virtual bool exists(const UniConfKey &key);
69  virtual bool haschildren(const UniConfKey &key);
70  virtual bool isok();
71  virtual Iter *iterator(const UniConfKey &key);
72  virtual Iter *recursiveiterator(const UniConfKey &key);
73 
74 protected:
79  virtual void gencallback(const UniConfKey &key, WvStringParm value);
80 };
81 
82 #endif //__UNIFILTERGEN_H