Merge branch 'config-size_t'

Add support for 64-bit numbers and size_t to wxConfig.

See https://github.com/wxWidgets/wxWidgets/pull/2272
This commit is contained in:
Vadim Zeitlin
2021-03-13 22:35:01 +01:00
22 changed files with 743 additions and 575 deletions

View File

@@ -549,6 +549,51 @@ public:
*/
bool Read(const wxString& key, long* l,
long defaultVal) const;
/**
Reads a 64-bit long long value, returning @true if the value was found.
If the value was not found, @a ll is not changed.
@since 3.1.5
@beginWxPerlOnly
Not supported by wxPerl.
@endWxPerlOnly
*/
bool Read(const wxString& key, wxLongLong_t* ll) const;
/**
Reads a 64-bit long long value, returning @true if the value was found.
If the value was not found, @a defaultVal is used instead.
@since 3.1.5
@beginWxPerlOnly
Not supported by wxPerl.
@endWxPerlOnly
*/
bool Read(const wxString& key, wxLongLong_t* ll,
/**
Reads a size_t value, returning @true if the value was found.
If the value was not found, @a value is not changed.
@since 3.1.5
@beginWxPerlOnly
Not supported by wxPerl.
@endWxPerlOnly
*/
bool Read(const wxString& key, size_t* value) const;
/**
Reads a size_t value, returning @true if the value was found.
If the value was not found, @a defaultVal is used instead.
@since 3.1.5
@beginWxPerlOnly
Not supported by wxPerl.
@endWxPerlOnly
*/
bool Read(const wxString& key, size_t* value,
size_t defaultVal) const;
/**
Reads a double value, returning @true if the value was found. If the
value was not found, @a d is not changed.
@@ -662,6 +707,14 @@ public:
*/
long ReadLong(const wxString& key, long defaultVal) const;
/**
Reads a 64-bit long long value from the key and returns it. @a
defaultVal is returned if the key is not found.
@since 3.1.5
*/
wxLongLong_t ReadLongLong(const wxString& key, wxLongLong_t defaultVal) const;
/**
Reads a value of type T (for which the function wxFromString() must be
defined) from the key and returns it. @a defaultVal is returned if the
@@ -678,6 +731,13 @@ public:
Writes the long value to the config file and returns @true on success.
*/
bool Write(const wxString& key, long value);
/**
Writes the 64-bit long long value to the config file and returns @true
on success.
@since 3.1.5
*/
bool Write(const wxString& key, wxLongLong_t value);
/**
Writes the double value to the config file and returns @true on
success.

View File

@@ -350,6 +350,14 @@ public:
*/
bool QueryValue(const wxString& szValue, long* plValue) const;
/**
Retrieves the 64-bit value. Returns @true if successful.
An empty @a szValue queries the default/unnamed key value.
@since 3.1.5
*/
bool QueryValue64(const wxString& szValue, wxLongLong_t* plValue) const;
/**
Retrieves the binary structure. Returns @true if successful.
An empty @a szValue queries the default/unnamed key value.
@@ -397,6 +405,17 @@ public:
An empty @a szValue sets the default/unnamed key value.
*/
bool SetValue(const wxString& szValue, long lValue);
/**
Sets a 64-bit value.
This function creates or modifies a field of @c QWORD type in the
registry.
@since 3.1.5
*/
bool SetValue64(const wxString& szValue, wxLongLong_t lValue);
/**
Sets the given @a szValue which must be string. If the value doesn't
exist, it is created. Returns @true if successful.