struct WXDLLIMPEXP_BASE wxArgNormalizer<const wxCStrData&>
{
wxArgNormalizer(const wxCStrData& value) : m_value(value) {}
- const wxStringCharType *get() const;
+ const wxChar *get() const; // FIXME-UTF8: should be wxStringCharType
const wxCStrData& m_value;
};
struct WXDLLIMPEXP_BASE wxArgNormalizer<const wxString&>
{
wxArgNormalizer(const wxString& value) : m_value(value) {}
- const wxStringCharType *get() const;
+ const wxChar *get() const; // FIXME-UTF8: should be wxStringCharType
const wxString& m_value;
};
: wxArgNormalizer<const wxString&>(value) {}
};
-#if wxUSE_UNICODE_WCHAR
-
+#if wxUSE_UNICODE // FIXME-UTF8: should be wxUSE_UNICODE_WCHAR
template<>
struct WXDLLIMPEXP_BASE wxArgNormalizer<const char*>
{
wxArgNormalizer(char *value)
: wxArgNormalizer<const char*>(value) {}
};
+#endif // wxUSE_UNICODE_WCHAR
-#elif wxUSE_WCHAR_T // !wxUSE_UNICODE_WCHAR && wxUSE_WCHAR_T
+// FIXME-UTF8
+#if 0 // wxUSE_UNICODE_UTF8
+// for conversion from local charset to UTF-8
+template<>
+struct WXDLLIMPEXP_BASE wxArgNormalizer<const char*>
+{
+ wxArgNormalizer(const char *value);
+ ~wxArgNormalizer();
+ const char *get() const;
+
+ wxCharBuffer *m_value;
+};
+
+template<>
+struct wxArgNormalizer<char*> : public wxArgNormalizer<const char*>
+{
+ wxArgNormalizer(char *value)
+ : wxArgNormalizer<const char*>(value) {}
+};
+#endif // wxUSE_UNICODE_UTF8
+#if /*wxUSE_UNICODE_UTF8 || */ !wxUSE_UNICODE // FIXME-UTF8
template<>
struct WXDLLIMPEXP_BASE wxArgNormalizer<const wchar_t*>
{
wxArgNormalizer(wchar_t *value)
: wxArgNormalizer<const wchar_t*>(value) {}
};
+#endif // wxUSE_UNICODE_UTF8 || !wxUSE_UNICODE
+
+// versions for passing wx[W]CharBuffer:
+template<>
+struct WXDLLIMPEXP_BASE wxArgNormalizer<wxCharBuffer>
+ : public wxArgNormalizer<const char*>
+{
+ wxArgNormalizer(const wxCharBuffer& buf);
+};
+
+template<>
+struct WXDLLIMPEXP_BASE wxArgNormalizer<wxWCharBuffer>
+ : public wxArgNormalizer<const wchar_t*>
+{
+ wxArgNormalizer(const wxWCharBuffer& buf);
+};
+
-#endif // wxUSE_UNICODE_WCHAR / !wxUSE_UNICODE_WCHAR && wxUSE_WCHAR_T
// NB: The vararg emulation code is limited to 30 arguments at the moment.
// If you need more, you need to