Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

uniregistrygen.h

Go to the documentation of this file.
00001 /* -*- Mode: C++ -*- 00002 * Worldvisions Weaver Software: 00003 * Copyright (C) 1997-2003 Net Integration Technologies, Inc. 00004 * 00005 * A generator that exposes the windows registry. 00006 * 00007 * When linking statically, use the following #pragma to ensure this 00008 * generator gets registered: 00009 * #pragma comment(linker, "/include:?UniRegistryGenMoniker@@3V?$WvMoniker@VUniConfGen@@@@A") 00010 */ 00011 #ifndef __UNICONFREGISTRY_H 00012 #define __UNICONFREGISTRY_H 00013 00014 #include "uniconfgen.h" 00015 #include "wvlog.h" 00016 #include "windows.h" 00017 00018 /** 00019 * A generator that exposes the windows registry. 00020 * 00021 * To mount, use the moniker "registry:". 00022 * 00023 */ 00024 class UniRegistryGen : public UniConfGen 00025 { 00026 WvLog m_log; 00027 HKEY m_hRoot; 00028 00029 HKEY follow_path(const UniConfKey &key, bool create, bool *isValue); 00030 00031 public: 00032 UniRegistryGen(WvString _base); 00033 virtual ~UniRegistryGen(); 00034 00035 /***** Overridden methods *****/ 00036 00037 virtual bool isok(); 00038 virtual WvString get(const UniConfKey &key); 00039 virtual void set(const UniConfKey &key, WvStringParm value); 00040 virtual bool exists(const UniConfKey &key); 00041 virtual bool haschildren(const UniConfKey &key); 00042 virtual Iter *iterator(const UniConfKey &key); 00043 }; 00044 00045 #if 0 00046 class UniRegistryGen::Iter : public UniRegistryGen::Iter 00047 { 00048 public: 00049 /** Destroys the iterator. */ 00050 virtual ~Iter() { } 00051 00052 /** 00053 * Rewinds the iterator. 00054 * Must be called prior to the first invocation of next(). 00055 */ 00056 virtual void rewind() = 0; 00057 00058 /** 00059 * Seeks to the next element in the sequence. 00060 * Returns true if that element exists. 00061 * Must be called prior to the first invocation of key(). 00062 */ 00063 virtual bool next() = 0; 00064 00065 /** Returns the current key. */ 00066 virtual UniConfKey key() const = 0; 00067 }; 00068 #endif 00069 #endif // __UNICONFREGISTRY_H

Generated on Tue Oct 5 01:09:19 2004 for WvStreams by doxygen 1.3.7