- 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;
+ bool Read(const wxString& key, wxString *pStr) const;
+ bool Read(const wxString& key, wxString *pStr, const wxString& defVal) const;
+
+ // read a number (long)
+ bool Read(const wxString& key, long *pl) const;
+ bool Read(const wxString& key, long *pl, long defVal) const;
+
+ // read an int
+ bool Read(const wxString& key, int *pi) const;
+ bool Read(const wxString& key, int *pi, int defVal) const;
+
+ // read a double
+ bool Read(const wxString& key, double* val) const;
+ bool Read(const wxString& key, double* val, double defVal) const;
+
+ // read a bool
+ bool Read(const wxString& key, bool* val) const;
+ bool Read(const wxString& key, bool* val, bool defVal) const;
+
+ // convenience functions returning directly the value (we don't have them for
+ // int/double/bool as there would be ambiguities with the long one then)
+ wxString Read(const wxString& key,
+ const wxString& defVal = wxEmptyString) const
+ { wxString s; (void)Read(key, &s, defVal); return s; }
+
+ long Read(const wxString& key, long defVal) const
+ { long l; (void)Read(key, &l, defVal); return l; }