]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/regconf.h
1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: Registry based implementation of wxConfig
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class wxRegConfig
: public wxConfig
23 // will store data in HKLM\strRegHive and HKCU\strRegHive
24 wxRegConfig(const wxString
& strRegHive
);
25 // dtor will save unsaved data
26 virtual ~wxRegConfig();
28 // implement inherited pure virtual functions
29 // ------------------------------------------
32 virtual void SetPath(const wxString
& strPath
);
33 virtual const wxString
& GetPath() const { return m_strPath
; }
36 virtual bool GetFirstGroup(wxString
& str
, long& lIndex
);
37 virtual bool GetNextGroup (wxString
& str
, long& lIndex
);
38 virtual bool GetFirstEntry(wxString
& str
, long& lIndex
);
39 virtual bool GetNextEntry (wxString
& str
, long& lIndex
);
42 virtual bool Read(wxString
&, const char *, const char * = 0) const;
43 virtual bool Read(long&, const char *, long = 0) const;
44 virtual bool Write(const char *szKey
, const char *szValue
);
45 virtual bool Write(const char *szKey
, long Value
);
46 virtual bool Flush(bool /* bCurrentOnly = FALSE */ ) { return true; }
49 virtual bool DeleteEntry(const char *szKey
, bool bGroupIfEmptyAlso
);
50 virtual bool DeleteGroup(const char *szKey
);
51 virtual bool DeleteAll();
54 // these keys are opened during all lifetime of wxRegConfig object
55 wxRegKey m_keyLocalRoot
, m_keyLocal
,
56 m_keyGlobalRoot
, m_keyGlobal
;
58 // current path (not '/' terminated)