• Main Page
  • Classes
  • Files
  • Directories
  • File List
  • File Members

vtkKWWin32RegistryHelper.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Module:    $RCSfile: vtkKWWin32RegistryHelper.h,v $
00004 
00005   Copyright (c) Kitware, Inc.
00006   All rights reserved.
00007   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 // .NAME vtkKWWin32RegistryHelper - A Win32 implementation of the registry
00015 // .SECTION Description
00016 // This class abstracts the storing of data that can be restored
00017 // when the program executes again. It is designed specifically for 
00018 // Win32 platform.
00019 
00020 #ifndef __vtkKWWin32RegistryHelper_h
00021 #define __vtkKWWin32RegistryHelper_h
00022 
00023 #include "vtkKWRegistryHelper.h"
00024 #include "vtkWindows.h" // needed for HKEY
00025 
00026 class KWWidgets_EXPORT vtkKWWin32RegistryHelper : public vtkKWRegistryHelper
00027 {
00028 public:
00029   static vtkKWWin32RegistryHelper* New();
00030   vtkTypeRevisionMacro(vtkKWWin32RegistryHelper, vtkKWRegistryHelper);
00031   void PrintSelf(ostream& os, vtkIndent indent);
00032 
00033   // Description:
00034   // Set or get the organization registry key.
00035   // This is valid for the Win32 registry only. Keys are placed under
00036   // HKEY_CURRENT_USER\Software\Organization\TopLevel\Subkey\Key,
00037   // where TopLevel can be set a the superclass level (vtkKWRegistryHelper)
00038   // and Subkey and Key are specified through the SetValue API. 
00039   vtkSetStringMacro(Organization);
00040   vtkGetStringMacro(Organization);
00041 
00042   // Description:
00043   // Read a value from the registry.
00044   virtual int ReadValueInternal(const char *key, char *value); 
00045 
00046   // Description:
00047   // Read a DWORD value from the registry.
00048   // Warning: this is not part of the cross-platform API 
00049   // because it is aware of type (DWORD) to read.
00050   virtual int ReadValueInternal(const char *key, int *value); 
00051 
00052   // Description:
00053   // Delete a key from the registry.
00054   virtual int DeleteKeyInternal(const char *key);
00055 
00056   // Description:
00057   // Delete a value from a given key.
00058   virtual int DeleteValueInternal(const char *key);
00059 
00060   // Description:
00061   // Set value in a given key.
00062   virtual int SetValueInternal(const char *key, const char *value);
00063   
00064   // Description:
00065   // Set DWORD value in a given key.
00066   // Warning: this is not part of the cross-platform API 
00067   // because it is aware of type (DWORD) to write.
00068   virtual int SetValueInternal(const char *key, int *value);
00069   
00070   // Description:
00071   // Open the registry at toplevel/subkey.
00072   virtual int OpenInternal(const char *toplevel, const char *subkey, int readonly);
00073   
00074   // Description:
00075   // Open the registry at the given key.
00076   virtual int OpenInternal(const char *key, int readonly);
00077 
00078   // Description:
00079   // Close the registry.
00080   virtual int CloseInternal();
00081 
00082 protected:
00083   vtkKWWin32RegistryHelper();
00084   virtual ~vtkKWWin32RegistryHelper();
00085 
00086 private:
00087   char *Organization;
00088   HKEY HKey;
00089   vtkKWWin32RegistryHelper(const vtkKWWin32RegistryHelper&); // Not implemented
00090   void operator=(const vtkKWWin32RegistryHelper&); // Not implemented
00091 };
00092 
00093 #endif
00094 
00095 
00096 

Generated on Sat Dec 11 2010 02:08:01 for KWWidgets by  doxygen 1.7.2