Finished review/fixes of Math and Miscellaneous categories of functions and macros.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
/**
|
||||
This function encodes the given data using base64.
|
||||
|
||||
To allocate the buffer of the correct size, use wxBase64EncodedSize() or call
|
||||
this function with @a dst set to @NULL -- it will then return the necessary
|
||||
buffer size.
|
||||
To allocate the buffer of the correct size, use wxBase64EncodedSize() or
|
||||
call this function with @a dst set to @NULL -- it will then return the
|
||||
necessary buffer size.
|
||||
|
||||
This raw encoding function overload writes the output string into the
|
||||
provided buffer; the other overloads return it as a wxString.
|
||||
@@ -34,33 +34,39 @@
|
||||
The length of the input data.
|
||||
|
||||
@returns @c wxCONV_FAILED if the output buffer is too small.
|
||||
|
||||
@header{wx/base64.h}
|
||||
*/
|
||||
size_t wxBase64Encode(char* dst, size_t dstLen,
|
||||
const void* src,
|
||||
size_t srcLen);
|
||||
|
||||
/**
|
||||
This function encodes the given data using base64 and returns the output
|
||||
as a wxString.
|
||||
This function encodes the given data using base64 and returns the output as
|
||||
a wxString.
|
||||
|
||||
There is no error return.
|
||||
|
||||
To allocate the buffer of the correct size, use wxBase64EncodedSize() or call
|
||||
this function with @a dst set to @NULL -- it will then return the necessary
|
||||
buffer size.
|
||||
To allocate the buffer of the correct size, use wxBase64EncodedSize() or
|
||||
call this function with @a dst set to @NULL -- it will then return the
|
||||
necessary buffer size.
|
||||
|
||||
@param src
|
||||
The input buffer, must not be @NULL.
|
||||
@param srcLen
|
||||
The length of the input data.
|
||||
|
||||
@header{wx/base64.h}
|
||||
*/
|
||||
wxString wxBase64Encode(const void* src, size_t srcLen);
|
||||
|
||||
/**
|
||||
This function encodes the given data using base64 and returns the output
|
||||
as a wxString.
|
||||
This function encodes the given data using base64 and returns the output as
|
||||
a wxString.
|
||||
|
||||
There is no error return.
|
||||
|
||||
@header{wx/base64.h}
|
||||
*/
|
||||
wxString wxBase64Encode(const wxMemoryBuffer& buf);
|
||||
|
||||
@@ -69,6 +75,8 @@ wxString wxBase64Encode(const wxMemoryBuffer& buf);
|
||||
Returns the size of the buffer necessary to contain the data encoded in a
|
||||
base64 string of length @e srcLen. This can be useful for allocating a
|
||||
buffer to be passed to wxBase64Decode().
|
||||
|
||||
@header{wx/base64.h}
|
||||
*/
|
||||
size_t wxBase64DecodedSize(size_t srcLen);
|
||||
|
||||
@@ -76,32 +84,36 @@ size_t wxBase64DecodedSize(size_t srcLen);
|
||||
Returns the length of the string with base64 representation of a buffer of
|
||||
specified size @e len. This can be useful for allocating the buffer passed
|
||||
to wxBase64Encode().
|
||||
|
||||
@header{wx/base64.h}
|
||||
*/
|
||||
size_t wxBase64EncodedSize(size_t len);
|
||||
|
||||
/**
|
||||
This function decodes a Base64-encoded string.
|
||||
|
||||
This overload is a raw decoding function and decodes the data into the provided
|
||||
buffer @a dst of the given size @e dstLen. An error is returned if the buffer
|
||||
is not large enough -- that is not at least wxBase64DecodedSize(srcLen)() bytes.
|
||||
This overload is a raw decoding function and decodes the data into the
|
||||
provided buffer @a dst of the given size @e dstLen. An error is returned if
|
||||
the buffer is not large enough -- that is not at least
|
||||
wxBase64DecodedSize(srcLen) bytes.
|
||||
|
||||
This overload returns the number of bytes written to the buffer or the
|
||||
necessary buffer size if @a dst was @NULL or @c wxCONV_FAILED on
|
||||
error, e.g. if the output buffer is too small or invalid characters were
|
||||
necessary buffer size if @a dst was @NULL or @c wxCONV_FAILED on error,
|
||||
e.g. if the output buffer is too small or invalid characters were
|
||||
encountered in the input string.
|
||||
|
||||
@param dst
|
||||
Pointer to output buffer, may be @NULL to just compute the
|
||||
necessary buffer size.
|
||||
Pointer to output buffer, may be @NULL to just compute the necessary
|
||||
buffer size.
|
||||
@param dstLen
|
||||
The size of the output buffer, ignored if dst is @NULL.
|
||||
@param src
|
||||
The input string, must not be @NULL. For the version using
|
||||
wxString, the input string should contain only ASCII characters.
|
||||
The input string, must not be @NULL. For the version using wxString,
|
||||
the input string should contain only ASCII characters.
|
||||
@param srcLen
|
||||
The length of the input string or special value wxNO_LEN if the string is
|
||||
NUL-terminated and the length should be computed by this function itself.
|
||||
The length of the input string or special value wxNO_LEN if the string
|
||||
is @NULL-terminated and the length should be computed by this function
|
||||
itself.
|
||||
@param mode
|
||||
This parameter specifies the function behaviour when invalid characters
|
||||
are encountered in input. By default, any such character stops the
|
||||
@@ -109,8 +121,10 @@ size_t wxBase64EncodedSize(size_t len);
|
||||
white space characters are silently skipped instead. And if it is
|
||||
wxBase64DecodeMode_Relaxed, then all invalid characters are skipped.
|
||||
@param posErr
|
||||
If this pointer is non-@NULL and an error occurs during
|
||||
decoding, it is filled with the index of the invalid character.
|
||||
If this pointer is non-@NULL and an error occurs during decoding, it is
|
||||
filled with the index of the invalid character.
|
||||
|
||||
@header{wx/base64.h}
|
||||
*/
|
||||
size_t wxBase64Decode(void* dst, size_t dstLen,
|
||||
const char* src,
|
||||
@@ -127,6 +141,8 @@ size_t wxBase64Decode(void* dst, size_t dstLen,
|
||||
|
||||
This overload returns a buffer with the base64 decoded binary equivalent
|
||||
of the input string. In neither case is the buffer @NULL-terminated.
|
||||
|
||||
@header{wx/base64.h}
|
||||
*/
|
||||
wxMemoryBuffer wxBase64Decode(const char* src,
|
||||
size_t srcLen = wxNO_LEN,
|
||||
@@ -139,6 +155,8 @@ wxMemoryBuffer wxBase64Decode(const char* src,
|
||||
|
||||
This overload takes as input a wxString and returns the internally-allocated
|
||||
memory as a wxMemoryBuffer, containing the base64 decoded data.
|
||||
|
||||
@header{wx/base64.h}
|
||||
*/
|
||||
wxMemoryBuffer wxBase64Decode(const wxString& src,
|
||||
wxBase64DecodeMode mode = wxBase64DecodeMode_Strict,
|
||||
|
||||
Reference in New Issue
Block a user