00001 /* -*- Mode: C++ -*- 00002 * Worldvisions Weaver Software: 00003 * Copyright (C) 2002 Net Integration Technologies, Inc. 00004 * 00005 * A UniConfGen that makes everything slow. 00006 */ 00007 #ifndef __UNISLOWGEN_H 00008 #define __UNISLOWGEN_H 00009 00010 #include "unifiltergen.h" 00011 00023 class UniSlowGen : public UniFilterGen 00024 { 00025 public: 00026 UniSlowGen(IUniConfGen *inner); 00027 virtual ~UniSlowGen(); 00028 00029 virtual void commit(); 00030 virtual bool refresh(); 00031 virtual void flush_buffers() { } 00032 virtual WvString get(const UniConfKey &key); 00033 virtual bool exists(const UniConfKey &key); 00034 virtual bool haschildren(const UniConfKey &key); 00035 virtual Iter *iterator(const UniConfKey &key); 00036 virtual Iter *recursiveiterator(const UniConfKey &key); 00037 00038 int how_slow() const 00039 { return slowcount; } 00040 private: 00041 int slowcount; 00042 00043 void be_slow(WvStringParm what); 00044 void be_slow(WVSTRING_FORMAT_DECL) 00045 { be_slow(WvString(WVSTRING_FORMAT_CALL)); } 00046 }; 00047 00048 #endif //__UNISLOWGEN_H