(the code always felt back to wxEncodingConverter)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13781
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
class wxCharacterSet
{
public:
class wxCharacterSet
{
public:
- wxCharacterSet(const wxChar*name)
- : cname(name) {}
- virtual ~wxCharacterSet()
- {}
- virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n)
- { return (size_t)-1; }
- virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
- { return (size_t)-1; }
- virtual bool usable()
- { return FALSE; }
+ wxCharacterSet(const wxChar*name) : cname(name) {}
+ virtual ~wxCharacterSet() {}
+ virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) = 0;
+ virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) = 0;
+ virtual bool usable() const = 0;
public:
const wxChar*cname;
};
public:
const wxChar*cname;
};
size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
{ return work ? work->WC2MB(buf,psz,n) : (size_t)-1; }
size_t WC2MB(char *buf, const wchar_t *psz, size_t n)
{ return work ? work->WC2MB(buf,psz,n) : (size_t)-1; }
{ return work!=NULL; }
public:
wxMBConv*work;
{ return work!=NULL; }
public:
wxMBConv*work;
return len ? (buf ? len : len-1) : (size_t)-1;
}
return len ? (buf ? len : len-1) : (size_t)-1;
}
{ return m_CodePage != -1; }
public:
{ return m_CodePage != -1; }
public:
{ return (enc!=wxFONTENCODING_SYSTEM) && (enc!=wxFONTENCODING_DEFAULT); }
public:
{ return (enc!=wxFONTENCODING_SYSTEM) && (enc!=wxFONTENCODING_DEFAULT); }
public: