ReactOS  0.4.15-dev-3303-g1ade494
SettingsFieldBool Class Reference
Inheritance diagram for SettingsFieldBool:
Collaboration diagram for SettingsFieldBool:

Public Member Functions

 SettingsFieldBool (BOOL *pValue, LPCWSTR szRegName)
 
virtual BOOL Save (CRegKey &key) override
 
virtual BOOL Load (CRegKey &key) override
 
- Public Member Functions inherited from SettingsField
virtual ~SettingsField ()
 

Private Attributes

BOOLm_pValueStore
 
LPCWSTR m_RegName
 

Detailed Description

Definition at line 20 of file settings.cpp.

Constructor & Destructor Documentation

◆ SettingsFieldBool()

SettingsFieldBool::SettingsFieldBool ( BOOL pValue,
LPCWSTR  szRegName 
)
inline

Definition at line 23 of file settings.cpp.

24  : m_pValueStore(pValue), m_RegName(szRegName)
25  {
26  }
PWCHAR pValue
LPCWSTR m_RegName
Definition: settings.cpp:46
BOOL * m_pValueStore
Definition: settings.cpp:45

Member Function Documentation

◆ Load()

virtual BOOL SettingsFieldBool::Load ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 32 of file settings.cpp.

33  {
34  DWORD dwField;
35  LONG lResult = key.QueryDWORDValue(m_RegName, dwField);
36  if (lResult != ERROR_SUCCESS)
37  {
38  return FALSE;
39  }
40  *m_pValueStore = (BOOL)dwField;
41  return TRUE;
42  }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRUE
Definition: types.h:120
LPCWSTR m_RegName
Definition: settings.cpp:46
#define BOOL
Definition: nt_native.h:43
#define FALSE
Definition: types.h:117
long LONG
Definition: pedump.c:60
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: path.c:41
BOOL * m_pValueStore
Definition: settings.cpp:45

◆ Save()

virtual BOOL SettingsFieldBool::Save ( CRegKey key)
inlineoverridevirtual

Implements SettingsField.

Definition at line 28 of file settings.cpp.

29  {
30  return key.SetDWORDValue(m_RegName, (DWORD)(*m_pValueStore)) == ERROR_SUCCESS;
31  }
#define ERROR_SUCCESS
Definition: deptool.c:10
LPCWSTR m_RegName
Definition: settings.cpp:46
unsigned long DWORD
Definition: ntddk_ex.h:95
Definition: path.c:41
BOOL * m_pValueStore
Definition: settings.cpp:45

Member Data Documentation

◆ m_pValueStore

BOOL* SettingsFieldBool::m_pValueStore
private

Definition at line 45 of file settings.cpp.

Referenced by Load(), and Save().

◆ m_RegName

LPCWSTR SettingsFieldBool::m_RegName
private

Definition at line 46 of file settings.cpp.

Referenced by Load(), and Save().


The documentation for this class was generated from the following file: