]>
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 ///////////////////////////////////////////////////////////////////////////////
16 #pragma interface "regconf.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 class wxRegConfig
: public wxConfig
27 // will store data in HKLM\strRegHive and HKCU\strRegHive
28 wxRegConfig(const wxString
& strRegHive
);
29 // dtor will save unsaved data
30 virtual ~wxRegConfig();
32 // implement inherited pure virtual functions
33 // ------------------------------------------
36 virtual void SetPath(const wxString
& strPath
);
37 virtual const wxString
& GetPath() const { return m_strPath
; }
40 virtual bool GetFirstGroup(wxString
& str
, long& lIndex
);
41 virtual bool GetNextGroup (wxString
& str
, long& lIndex
);
42 virtual bool GetFirstEntry(wxString
& str
, long& lIndex
);
43 virtual bool GetNextEntry (wxString
& str
, long& lIndex
);
45 // tests for existence
46 virtual bool HasGroup(const wxString
& strName
) const;
47 virtual bool HasEntry(const wxString
& strName
) const;
50 virtual bool Read(wxString
&, const char *, const char * = 0) const;
51 virtual bool Read(long&, const char *, long = 0) const;
52 virtual bool Write(const char *szKey
, const char *szValue
);
53 virtual bool Write(const char *szKey
, long Value
);
54 virtual bool Flush(bool /* bCurrentOnly = FALSE */ ) { return TRUE
; }
57 virtual bool DeleteEntry(const char *szKey
, bool bGroupIfEmptyAlso
);
58 virtual bool DeleteGroup(const char *szKey
);
59 virtual bool DeleteAll();
62 // these keys are opened during all lifetime of wxRegConfig object
63 wxRegKey m_keyLocalRoot
, m_keyLocal
,
64 m_keyGlobalRoot
, m_keyGlobal
;
66 // current path (not '/' terminated)