Main Page   Class Hierarchy   Compound List   File List   Compound Members  

resConfigRegistryWindows.h

00001 //////////////////////////////////////////////////////////////////////
00002 // Copyright (c) 2001-2002 David Pritchard <drpritch@alumni.uwaterloo.ca>
00003 // 
00004 // This program is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public License
00006 // as published by the Free Software Foundation; either
00007 // version 2 of the License, or (at your option) any later
00008 // version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU Lesser General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU Lesser General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00018 
00019 #ifndef freecloth_resmgt_resConfigRegistryWindows_h
00020 #define freecloth_resmgt_resConfigRegistryWindows_h
00021 
00022 #ifndef freecloth_resmgt_package_h
00023 #include <freecloth/resmgt/package.h>
00024 #endif
00025 
00026 #ifndef freecloth_resmgt_resConfigRegistry_h
00027 #include <freecloth/resmgt/resConfigRegistry.h>
00028 #endif
00029 
00030 #ifndef freecloth_base_windows_h
00031 #include <freecloth/base/windows.h>
00032 #endif
00033 
00034 FREECLOTH_NAMESPACE_START
00035 
00036 ////////////////////////////////////////////////////////////////////////////////
00037 // FORWARD DECLARATIONS
00038 
00039 ////////////////////////////////////////////////////////////////////////////////
00040 // CLASS ResConfigRegistryWWindows
00041 //
00042 // Configuration writer for Windows, using registry keys.
00043 //
00044 class ResConfigRegistryWWindows : public ResConfigRegistryW {
00045 
00046 public:
00047     //----- member functions -----
00048 
00049     ResConfigRegistryWWindows( const String& keyName );
00050     virtual ~ResConfigRegistryWWindows();
00051 
00052     virtual void writeString(
00053         const String& key,
00054         const String&
00055     );
00056     virtual void writeUInt32(
00057         const String& key,
00058         UInt32
00059     );
00060     virtual void writeFloat(
00061         const String& key,
00062         Float
00063     );
00064 
00065 private:
00066     HKEY _hkey;
00067 };
00068 
00069 ////////////////////////////////////////////////////////////////////////////////
00070 // CLASS ResConfigRegistryRWindows
00071 //
00072 // Configuration reader for Windows, using registry keys.
00073 //
00074 class ResConfigRegistryRWindows : public ResConfigRegistryR {
00075 
00076 public:
00077     //----- member functions -----
00078 
00079     ResConfigRegistryRWindows( const String& keyName );
00080     virtual ~ResConfigRegistryRWindows();
00081 
00082     virtual bool hasKey( const String& key ) const;
00083 
00084     virtual String readString(
00085         const String& key,
00086         const String& def
00087     ) const;
00088     virtual UInt32 readUInt32(
00089         const String& key,
00090         UInt32 def
00091     ) const;
00092     virtual Float readFloat(
00093         const String& key,
00094         Float def
00095     ) const;
00096 
00097 private:
00098     HKEY _hkey;
00099 };
00100 
00101 FREECLOTH_NAMESPACE_END
00102 
00103 #endif

Generated on Fri May 2 16:51:13 2003 for Freecloth by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002