]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/iniconf.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/iniconf.cpp
3 // Purpose: implementation of wxIniConfig class
4 // Author: William Osborne
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
13 #pragma implementation "iniconf.h"
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
24 #include "wx/string.h"
31 // Doesn't yet compile in Unicode mode
33 #if wxUSE_CONFIG && !wxUSE_UNICODE
35 #include "wx/dynarray.h"
37 #include "wx/config.h"
40 #include "wx/palmos/iniconf.h"
42 #include "wx/palmos/wrapwin.h"
44 // ----------------------------------------------------------------------------
46 // ----------------------------------------------------------------------------
48 // we replace all path separators with this character
49 #define PATH_SEP_REPLACE '_'
51 // ============================================================================
53 // ============================================================================
55 // ----------------------------------------------------------------------------
57 // ----------------------------------------------------------------------------
59 wxIniConfig::wxIniConfig(const wxString
& strAppName
,
60 const wxString
& strVendor
,
61 const wxString
& localFilename
,
62 const wxString
& globalFilename
,
64 : wxConfigBase(strAppName
, strVendor
, localFilename
, globalFilename
, style
)
68 wxIniConfig::~wxIniConfig()
72 // ----------------------------------------------------------------------------
74 // ----------------------------------------------------------------------------
76 void wxIniConfig::SetPath(const wxString
& strPath
)
80 const wxString
& wxIniConfig::GetPath() const
82 static wxString s_str
;
87 wxString
wxIniConfig::GetPrivateKeyName(const wxString
& szKey
) const
94 wxString
wxIniConfig::GetKeyName(const wxString
& szKey
) const
101 // ----------------------------------------------------------------------------
103 // ----------------------------------------------------------------------------
105 bool wxIniConfig::GetFirstGroup(wxString
& WXUNUSED(str
), long& WXUNUSED(lIndex
)) const
110 bool wxIniConfig::GetNextGroup (wxString
& WXUNUSED(str
), long& WXUNUSED(lIndex
)) const
115 bool wxIniConfig::GetFirstEntry(wxString
& WXUNUSED(str
), long& WXUNUSED(lIndex
)) const
120 bool wxIniConfig::GetNextEntry (wxString
& WXUNUSED(str
), long& WXUNUSED(lIndex
)) const
125 // ----------------------------------------------------------------------------
127 // ----------------------------------------------------------------------------
129 size_t wxIniConfig::GetNumberOfEntries(bool WXUNUSED(bRecursive
)) const
134 size_t wxIniConfig::GetNumberOfGroups(bool WXUNUSED(bRecursive
)) const
139 bool wxIniConfig::HasGroup(const wxString
& WXUNUSED(strName
)) const
144 bool wxIniConfig::HasEntry(const wxString
& WXUNUSED(strName
)) const
149 // is current group empty?
150 bool wxIniConfig::IsEmpty() const
155 // ----------------------------------------------------------------------------
157 // ----------------------------------------------------------------------------
159 bool wxIniConfig::DoReadString(const wxString
& szKey
, wxString
*pstr
) const
164 bool wxIniConfig::DoReadLong(const wxString
& szKey
, long *pl
) const
169 bool wxIniConfig::DoWriteString(const wxString
& szKey
, const wxString
& szValue
)
174 bool wxIniConfig::DoWriteLong(const wxString
& szKey
, long lValue
)
179 bool wxIniConfig::Flush(bool /* bCurrentOnly */)
184 // ----------------------------------------------------------------------------
186 // ----------------------------------------------------------------------------
188 bool wxIniConfig::DeleteEntry(const wxString
& szKey
, bool bGroupIfEmptyAlso
)
193 bool wxIniConfig::DeleteGroup(const wxString
& szKey
)
202 bool wxIniConfig::DeleteAll()
207 bool wxIniConfig::RenameEntry(const wxString
& WXUNUSED(oldName
),
208 const wxString
& WXUNUSED(newName
))
213 bool wxIniConfig::RenameGroup(const wxString
& WXUNUSED(oldName
),
214 const wxString
& WXUNUSED(newName
))
220 // wxUSE_CONFIG && wxUSE_UNICODE