- virtual bool Read(wxString *pStr, const char *szKey,
- const char *szDefault = (const char *) NULL) const = 0;
- // another version using statis buffer - it means it will be overwritten
- // after each call to this function!
- virtual const char *Read(const char *szKey,
- const char *szDefault = (const char *) NULL) const;
- // the same for longs
- virtual long Read(const char *szKey, long lDefault) const
- { long l; Read(&l, szKey, lDefault); return l; }
- // and another version: returns true if default value is returned
- virtual bool Read(long *pl, const char *szKey, long lDefault = 0) const = 0;
+ virtual bool Read(const wxString& key, wxString *pStr) const = 0;
+ virtual bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
+
+ virtual wxString Read(const wxString& key, const wxString& defVal = "") const;
+
+ virtual bool Read(const wxString& key, long *pl) const = 0;
+ virtual bool Read(const wxString& key, long *pl, long defVal) const;
+
+ virtual long Read(const wxString& strKey, long defVal) const
+ { long l; Read(strKey, &l, defVal); return l; }
+
+ // Convenience functions that are built on other forms
+
+ // int
+ virtual bool Read(const wxString& key, int *pi) const;
+ virtual bool Read(const wxString& key, int *pi, int defVal) const;
+
+ // double
+ virtual bool Read(const wxString& key, double* val) const;
+ virtual bool Read(const wxString& key, double* val, double defVal) const;
+
+ // bool
+ virtual bool Read(const wxString& key, bool* val) const;
+ virtual bool Read(const wxString& key, bool* val, bool defVal) const;