/////////////////////////////////////////////////////////////////////////////
// Name: strconv.h
-// Purpose: documentation for wxMBConvUTF7 class
+// Purpose: interface of wxMBConvUTF7
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
@library{wxbase}
@category{FIXME}
- @seealso
- wxMBConvUTF8, @ref overview_mbconvclasses "wxMBConv classes overview"
+ @see wxMBConvUTF8, @ref overview_mbconv "wxMBConv classes overview"
*/
class wxMBConvUTF7 : public wxMBConv
{
Converts from UTF-7 encoding to Unicode. Returns the size of the destination
buffer.
*/
- size_t MB2WC(wchar_t* buf, const char* psz, size_t n);
+ size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const;
/**
Converts from Unicode to UTF-7 encoding. Returns the size of the destination
buffer.
*/
- size_t WC2MB(char* buf, const wchar_t* psz, size_t n);
+ size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const;
};
+
/**
@class wxMBConvUTF8
@wxheader{strconv.h}
@library{wxbase}
@category{FIXME}
- @seealso
- wxMBConvUTF7, @ref overview_mbconvclasses "wxMBConv classes overview"
+ @see wxMBConvUTF7, @ref overview_mbconv "wxMBConv classes overview"
*/
class wxMBConvUTF8 : public wxMBConv
{
Converts from UTF-8 encoding to Unicode. Returns the size of the destination
buffer.
*/
- size_t MB2WC(wchar_t* buf, const char* psz, size_t n);
+ size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const;
/**
Converts from Unicode to UTF-8 encoding. Returns the size of the destination
buffer.
*/
- size_t WC2MB(char* buf, const wchar_t* psz, size_t n);
+ size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const;
};
+
/**
@class wxMBConvUTF16
@wxheader{strconv.h}
This class is used to convert between multibyte encodings and UTF-16 Unicode
- encoding (also known as UCS-2). Unlike UTF-8 encoding,
+ encoding (also known as UCS-2). Unlike UTF-8() encoding,
UTF-16 uses words and not bytes and hence depends on the byte ordering:
big or little endian. Hence this class is provided in two versions:
wxMBConvUTF16LE and wxMBConvUTF16BE and wxMBConvUTF16 itself is just a typedef
@library{wxbase}
@category{FIXME}
- @seealso
- wxMBConvUTF8, wxMBConvUTF32, @ref overview_mbconvclasses "wxMBConv classes
- overview"
+ @see wxMBConvUTF8, wxMBConvUTF32, @ref overview_mbconv "wxMBConv classes overview"
*/
class wxMBConvUTF16 : public wxMBConv
{
Converts from UTF-16 encoding to Unicode. Returns the size of the destination
buffer.
*/
- size_t MB2WC(wchar_t* buf, const char* psz, size_t n);
+ size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const;
/**
Converts from Unicode to UTF-16 encoding. Returns the size of the destination
buffer.
*/
- size_t WC2MB(char* buf, const wchar_t* psz, size_t n);
+ size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const;
};
+
/**
@class wxCSConv
@wxheader{strconv.h}
@library{wxbase}
@category{FIXME}
- @seealso
- wxMBConv, wxEncodingConverter, @ref overview_mbconvclasses "wxMBConv classes
- overview"
+ @see wxMBConv, wxEncodingConverter, @ref overview_mbconv "wxMBConv classes overview"
*/
class wxCSConv : public wxMBConv
{
public:
- //@{
/**
- Constructor. You may specify either the name of the character set you want to
- convert from/to or an encoding constant. If the character set name (or the
- encoding) is not recognized, ISO 8859-1 is used as fall back.
+ Constructor. You can specify the name of the character set you want to
+ convert from/to. If the character set name is not recognized, ISO 8859-1
+ is used as fall back.
*/
wxCSConv(const wxChar* charset);
+
+ /**
+ Constructor. You can specify an encoding constant for the
+ character set you want to convert from/to or. If the encoding
+ is not recognized, ISO 8859-1 is used as fall back.
+ */
wxCSConv(wxFontEncoding encoding);
- //@}
/**
Destructor frees any resources needed to perform the conversion.
available to use. Returns @false if ISO 8859-1 will be used instead.
Note this does not mean that a given string will be correctly converted.
A malformed string may still make conversion functions return @c wxCONV_FAILED.
- This function is new since wxWidgets version 2.8.2
+
+ @since 2.8.2
*/
- bool IsOk();
+ bool IsOk() const;
/**
Converts from the selected character set to Unicode. Returns length of string
written to destination buffer.
*/
- size_t MB2WC(wchar_t* buf, const char* psz, size_t n);
+ size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const;
/**
Converts from Unicode to the selected character set. Returns length of string
written to destination buffer.
*/
- size_t WC2MB(char* buf, const wchar_t* psz, size_t n);
+ size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const;
};
+
/**
@class wxMBConvFile
@wxheader{strconv.h}
@library{wxbase}
@category{FIXME}
- @seealso
- @ref overview_mbconvclasses "wxMBConv classes overview"
+ @see @ref overview_mbconv "wxMBConv classes overview"
*/
class wxMBConvFile : public wxMBConv
{
Converts from multibyte filename encoding to Unicode. Returns the size of the
destination buffer.
*/
- size_t MB2WC(wchar_t* buf, const char* psz, size_t n);
+ size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const;
/**
Converts from Unicode to multibyte filename encoding. Returns the size of the
destination buffer.
*/
- size_t WC2MB(char* buf, const wchar_t* psz, size_t n);
+ size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const;
};
+
/**
@class wxMBConvUTF32
@wxheader{strconv.h}
This class is used to convert between multibyte encodings and UTF-32 Unicode
- encoding (also known as UCS-4). Unlike UTF-8 encoding,
+ encoding (also known as UCS-4). Unlike UTF-8() encoding,
UTF-32 uses (double) words and not bytes and hence depends on the byte ordering:
big or little endian. Hence this class is provided in two versions:
wxMBConvUTF32LE and wxMBConvUTF32BE and wxMBConvUTF32 itself is just a typedef
@library{wxbase}
@category{FIXME}
- @seealso
- wxMBConvUTF8, wxMBConvUTF16, @ref overview_mbconvclasses "wxMBConv classes
- overview"
+ @see wxMBConvUTF8, wxMBConvUTF16, @ref overview_mbconv "wxMBConv classes overview"
*/
class wxMBConvUTF32 : public wxMBConv
{
Converts from UTF-32 encoding to Unicode. Returns the size of the destination
buffer.
*/
- size_t MB2WC(wchar_t* buf, const char* psz, size_t n);
+ size_t MB2WC(wchar_t* buf, const char* psz, size_t n) const;
/**
Converts from Unicode to UTF-32 encoding. Returns the size of the destination
buffer.
*/
- size_t WC2MB(char* buf, const wchar_t* psz, size_t n);
+ size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const;
};
+
/**
@class wxMBConv
@wxheader{strconv.h}
@library{wxbase}
@category{FIXME}
- @seealso
- wxCSConv, wxEncodingConverter, @ref overview_mbconvclasses "wxMBConv classes
- overview"
+ @see wxCSConv, wxEncodingConverter, @ref overview_mbconv "wxMBConv classes overview"
*/
class wxMBConv
{
return a new copy of the object it is called on. It is used for copying the
conversion objects while preserving their dynamic type.
*/
- virtual wxMBConv* Clone();
+ virtual wxMBConv* Clone() const;
/**
This function has the same semantics as ToWChar()
*/
virtual size_t FromWChar(char* dst, size_t dstLen,
const wchar_t* src,
- size_t srcLen = wxNO_LEN);
+ size_t srcLen = wxNO_LEN) const;
/**
This function returns 1 for most of the multibyte encodings in which the
The other cases are not currently supported and @c wxCONV_FAILED
(defined as -1) is returned for them.
*/
- size_t GetMBNulLen();
+ size_t GetMBNulLen() const;
/**
Returns the maximal value which can be returned by
size, i.e. the returned value does not include the trailing @c NUL. But
when the function is called with a non-@NULL @a out buffer, the @a outLen
parameter should be one more to allow to properly @c NUL-terminate the string.
-
+
@param out
The output buffer, may be @NULL if the caller is only
interested in the length of the resulting string
@param outLen
The length of the output buffer but including
NUL, ignored if out is @NULL
-
- @returns The length of the converted string excluding the trailing NUL.
+
+ @return The length of the converted string excluding the trailing NUL.
*/
virtual size_t MB2WC(wchar_t* out, const char* in,
- size_t outLen);
+ size_t outLen) const;
/**
The most general function for converting a multibyte string to a wide string.
*/
virtual size_t ToWChar(wchar_t* dst, size_t dstLen,
const char* src,
- size_t srcLen = wxNO_LEN);
+ size_t srcLen = wxNO_LEN) const;
/**
This function is deprecated, please use FromWChar() instead
into account the trailing @c NUL, which might take two or four bytes for some
encodings (UTF-16 and UTF-32) and not one.
*/
- virtual size_t WC2MB(char* buf, const wchar_t* psz, size_t n);
+ virtual size_t WC2MB(char* buf, const wchar_t* psz, size_t n) const;
//@{
/**
If @a outLen is not-@NULL, it receives the length of the converted
string.
*/
- const wxWCharBuffer cMB2WC(const char* in);
- const wxWCharBuffer cMB2WC(const char* in, size_t inLen,
- size_t outLen);
+ const wxWCharBuffer cMB2WC(const char* in) const;
+ const wxWCharBuffer cMB2WC(const char* in,
+ size_t inLen,
+ size_t outLen) const;
//@}
//@{
result in a wxWCharBuffer. The macro wxMB2WXbuf is defined as the correct
return type (without const).
*/
- const char* cMB2WX(const char* psz);
- const wxWCharBuffer cMB2WX(const char* psz);
+ const char* cMB2WX(const char* psz) const;
+ const wxWCharBuffer cMB2WX(const char* psz) const;
//@}
//@{
If @a outLen is not-@NULL, it receives the length of the converted
string.
*/
- const wxCharBuffer cWC2MB(const wchar_t* in);
- const wxCharBuffer cWC2MB(const wchar_t* in, size_t inLen,
- size_t outLen);
+ const wxCharBuffer cWC2MB(const wchar_t* in) const;
+ const wxCharBuffer cWC2MB(const wchar_t* in,
+ size_t inLen,
+ size_t outLen) const;
//@}
//@{
result in a wxCharBuffer. The macro wxWC2WXbuf is defined as the correct
return type (without const).
*/
- const wchar_t* cWC2WX(const wchar_t* psz);
- const wxCharBuffer cWC2WX(const wchar_t* psz);
+ const wchar_t* cWC2WX(const wchar_t* psz) const;
+ const wxCharBuffer cWC2WX(const wchar_t* psz) const;
//@}
//@{
result in a wxCharBuffer. The macro wxWX2MBbuf is defined as the correct
return type (without const).
*/
- const char* cWX2MB(const wxChar* psz);
- const wxCharBuffer cWX2MB(const wxChar* psz);
+ const char* cWX2MB(const wxChar* psz) const;
+ const wxCharBuffer cWX2MB(const wxChar* psz) const;
//@}
//@{
result in a wxWCharBuffer. The macro wxWX2WCbuf is defined as the correct
return type (without const).
*/
- const wchar_t* cWX2WC(const wxChar* psz);
- const wxWCharBuffer cWX2WC(const wxChar* psz);
+ const wchar_t* cWX2WC(const wxChar* psz) const;
+ const wxWCharBuffer cWX2WC(const wxChar* psz) const;
//@}
};
+