KWWidgets
Main Page
Classes
Files
File List
File Members
vtkKWWin32RegistryHelper.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Module: $RCSfile: vtkKWWin32RegistryHelper.h,v $
4
5
Copyright (c) Kitware, Inc.
6
All rights reserved.
7
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notice for more information.
12
13
=========================================================================*/
14
// .NAME vtkKWWin32RegistryHelper - A Win32 implementation of the registry
15
// .SECTION Description
16
// This class abstracts the storing of data that can be restored
17
// when the program executes again. It is designed specifically for
18
// Win32 platform.
19
20
#ifndef __vtkKWWin32RegistryHelper_h
21
#define __vtkKWWin32RegistryHelper_h
22
23
#include "
vtkKWRegistryHelper.h
"
24
#include "vtkWindows.h"
// needed for HKEY
25
26
class
KWWidgets_EXPORT
vtkKWWin32RegistryHelper
:
public
vtkKWRegistryHelper
27
{
28
public
:
29
static
vtkKWWin32RegistryHelper
*
New
();
30
vtkTypeRevisionMacro(
vtkKWWin32RegistryHelper
,
vtkKWRegistryHelper
);
31
void
PrintSelf
(ostream& os, vtkIndent indent);
32
33
// Description:
34
// Set or get the organization registry key.
35
// This is valid for the Win32 registry only. Keys are placed under
36
// HKEY_CURRENT_USER\Software\Organization\TopLevel\Subkey\Key,
37
// where TopLevel can be set a the superclass level (vtkKWRegistryHelper)
38
// and Subkey and Key are specified through the SetValue API.
39
vtkSetStringMacro(Organization);
40
vtkGetStringMacro(Organization);
41
42
// Description:
43
// Read a value from the registry.
44
virtual
int
ReadValueInternal
(
const
char
*key,
char
*value);
45
46
// Description:
47
// Read a DWORD value from the registry.
48
// Warning: this is not part of the cross-platform API
49
// because it is aware of type (DWORD) to read.
50
virtual
int
ReadValueInternal
(
const
char
*key,
int
*value);
51
52
// Description:
53
// Delete a key from the registry.
54
virtual
int
DeleteKeyInternal
(
const
char
*key);
55
56
// Description:
57
// Delete a value from a given key.
58
virtual
int
DeleteValueInternal
(
const
char
*key);
59
60
// Description:
61
// Set value in a given key.
62
virtual
int
SetValueInternal
(
const
char
*key,
const
char
*value);
63
64
// Description:
65
// Set DWORD value in a given key.
66
// Warning: this is not part of the cross-platform API
67
// because it is aware of type (DWORD) to write.
68
virtual
int
SetValueInternal
(
const
char
*key,
int
*value);
69
70
// Description:
71
// Open the registry at toplevel/subkey.
72
virtual
int
OpenInternal
(
const
char
*toplevel,
const
char
*subkey,
int
readonly);
73
74
// Description:
75
// Open the registry at the given key.
76
virtual
int
OpenInternal
(
const
char
*key,
int
readonly);
77
78
// Description:
79
// Close the registry.
80
virtual
int
CloseInternal
();
81
82
protected
:
83
vtkKWWin32RegistryHelper
();
84
virtual
~
vtkKWWin32RegistryHelper
();
85
86
private
:
87
char
*Organization;
88
HKEY HKey;
89
vtkKWWin32RegistryHelper
(
const
vtkKWWin32RegistryHelper
&);
// Not implemented
90
void
operator=(
const
vtkKWWin32RegistryHelper
&);
// Not implemented
91
};
92
93
#endif
94
95
96
Generated on Thu Apr 18 2013 08:50:51 for KWWidgets by
1.8.1.2