Preparing wxString for UTF-8 representation:

1) split into wxStringImpl class that has std::string-like API and operates on char* or wchar_t* data and wxString class that provides Unicode iterators and indexes
2) added both char* and wchar_t* versions of many wxString methods to avoid having to use _T()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-03-26 20:28:04 +00:00
parent d9485f89b8
commit 8f93a29f8e
5 changed files with 1568 additions and 806 deletions

View File

@@ -89,27 +89,11 @@ struct wxArgNormalizer
// special cases for converting strings:
// FIXME-UTF8: move this to chartype.h!
#if wxUSE_UNICODE
/* for now, all Unicode builds are wchar_t* based: */
#define wxUSE_UNICODE_WCHAR 1
#else
#define wxUSE_UNICODE_WCHAR 0
#endif
// FIXME-UTF8: include wx/chartype.h and use wxChar after headers split
// FIXME-UTF8: this will be char* in UTF-8 build and wchar_t* on Windows
#if wxUSE_UNICODE_WCHAR
typedef wchar_t wxArgNativeCharType;
#else
typedef char wxArgNativeCharType;
#endif
template<>
struct WXDLLIMPEXP_BASE wxArgNormalizer<const wxCStrData&>
{
wxArgNormalizer(const wxCStrData& value) : m_value(value) {}
const wxArgNativeCharType *get() const;
const wxStringCharType *get() const;
const wxCStrData& m_value;
};
@@ -125,7 +109,7 @@ template<>
struct WXDLLIMPEXP_BASE wxArgNormalizer<const wxString&>
{
wxArgNormalizer(const wxString& value) : m_value(value) {}
const wxArgNativeCharType *get() const;
const wxStringCharType *get() const;
const wxString& m_value;
};