HasGroup/Entry added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -42,6 +42,10 @@ public:
|
||||
virtual bool GetFirstEntry(wxString& str, long& lIndex);
|
||||
virtual bool GetNextEntry (wxString& str, long& lIndex);
|
||||
|
||||
// tests for existence
|
||||
virtual bool HasGroup(const wxString& strName) const;
|
||||
virtual bool HasEntry(const wxString& strName) const;
|
||||
|
||||
// read/write
|
||||
virtual bool Read(wxString&, const char *, const char * = 0) const;
|
||||
virtual bool Read(long&, const char *, long = 0) const;
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <wx/wx.h>
|
||||
#include <wx/config.h>
|
||||
#include <wx/regconf.h>
|
||||
#include <wx/registry.h>
|
||||
#include <wx/msw/registry.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// constants
|
||||
@@ -183,6 +183,20 @@ bool wxRegConfig::GetNextEntry (wxString& str, long& lIndex)
|
||||
return bOk;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// tests for existence
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool wxRegConfig::HasGroup(const wxString& strName) const
|
||||
{
|
||||
return m_keyLocal.HasSubKey(strName) || m_keyGlobal.HasSubKey(strName);
|
||||
}
|
||||
|
||||
bool wxRegConfig::HasEntry(const wxString& strName) const
|
||||
{
|
||||
return m_keyLocal.HasValue(strName) || m_keyGlobal.HasValue(strName);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// reading/writing
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user