Add wxConfig::Read(float *) overload.

This uses Read(double *) but casts the result to float after checking that it
is in the correct range.

Closes #12100.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-05-29 10:35:38 +00:00
parent 84f4eef892
commit 384859f8c6
5 changed files with 81 additions and 1 deletions

View File

@@ -589,10 +589,33 @@ public:
*/
bool Read(const wxString& key, double* d,
double defaultVal) const;
/**
Reads a bool value, returning @true if the value was found. If the
Reads a float value, returning @true if the value was found.
With the second overload, if the value was not found, @a defaultVal is
used instead.
Notice that the value is read as a double but must be in a valid range
for floats for the function to return @true.
@since 2.9.1
@beginWxPerlOnly
Not supported by wxPerl.
@endWxPerlOnly
*/
//@{
bool Read(const wxString& key, float* f) const;
bool Read(const wxString& key, float* f, float defaultVal) const;
//@}
/**
Reads a float value, returning @true if the value was found. If the
value was not found, @a b is not changed.
@since 2.9.1
@beginWxPerlOnly
Not supported by wxPerl.
@endWxPerlOnly