+
+ // vararg functions used by wxLogXXX():
+
+ // will log the message at the level specified in the ctor
+ //
+ // notice that this function supposes that the caller already checked that
+ // the level was enabled and does no checks itself
+ WX_DEFINE_VARARG_FUNC_VOID
+ (
+ Log,
+ 1, (const wxFormatString&),
+ DoLog, DoLogUtf8
+ )
+
+ // same as Log() but with an extra numeric or pointer parameters: this is
+ // used to pass an optional value by storing it in m_info under the name
+ // passed to MaybeStore() and is required to support "overloaded" versions
+ // of wxLogStatus() and wxLogSysError()
+ WX_DEFINE_VARARG_FUNC_VOID
+ (
+ Log,
+ 2, (long, const wxFormatString&),
+ DoLogWithNum, DoLogWithNumUtf8
+ )
+
+ // unfortunately we can't use "void *" here as we get overload ambiguities
+ // with Log(wxFormatString, ...) when the first argument is a "char *" or
+ // "wchar_t *" then -- so we only allow passing wxObject here, which is
+ // ugly but fine in practice as this overload is only used by wxLogStatus()
+ // whose first argument is a wxFrame
+ WX_DEFINE_VARARG_FUNC_VOID
+ (
+ Log,
+ 2, (wxObject *, const wxFormatString&),
+ DoLogWithPtr, DoLogWithPtrUtf8
+ )
+
+ // log the message at the level specified as its first argument
+ //
+ // as the macros don't have access to the level argument in this case, this
+ // function does check that the level is enabled itself
+ WX_DEFINE_VARARG_FUNC_VOID
+ (
+ LogAtLevel,
+ 2, (wxLogLevel, const wxFormatString&),
+ DoLogAtLevel, DoLogAtLevelUtf8
+ )
+
+ // special versions for wxLogTrace() which is passed either string or
+ // integer mask as first argument determining whether the message should be
+ // logged or not
+ WX_DEFINE_VARARG_FUNC_VOID
+ (
+ LogTrace,
+ 2, (const wxString&, const wxFormatString&),
+ DoLogTrace, DoLogTraceUtf8
+ )
+
+#if WXWIN_COMPATIBILITY_2_8
+ WX_DEFINE_VARARG_FUNC_VOID
+ (
+ LogTrace,
+ 2, (wxTraceMask, const wxFormatString&),
+ DoLogTraceMask, DoLogTraceMaskUtf8
+ )
+#endif // WXWIN_COMPATIBILITY_2_8
+
+#ifdef __WATCOMC__
+ // workaround for http://bugzilla.openwatcom.org/show_bug.cgi?id=351
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 1, (const wxString&),
+ (wxFormatString(f1)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 1, (const wxCStrData&),
+ (wxFormatString(f1)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 1, (const char*),
+ (wxFormatString(f1)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 1, (const wchar_t*),
+ (wxFormatString(f1)))
+
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 2, (long, const wxString&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 2, (long, const wxCStrData&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 2, (long, const char *),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 2, (long, const wchar_t *),
+ (f1, wxFormatString(f2)))
+
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 2, (wxObject *, const wxString&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 2, (wxObject *, const wxCStrData&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 2, (wxObject *, const char *),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, Log,
+ 2, (wxObject *, const wchar_t *),
+ (f1, wxFormatString(f2)))
+
+ WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel,
+ 2, (wxLogLevel, const wxString&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel,
+ 2, (wxLogLevel, const wxCStrData&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel,
+ 2, (wxLogLevel, const char *),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogAtLevel,
+ 2, (wxLogLevel, const wchar_t *),
+ (f1, wxFormatString(f2)))
+
+ WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
+ 2, (const wxString&, const wxString&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
+ 2, (const wxString&, const wxCStrData&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
+ 2, (const wxString&, const char *),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
+ 2, (const wxString&, const wchar_t *),
+ (f1, wxFormatString(f2)))
+
+#if WXWIN_COMPATIBILITY_2_8
+ WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
+ 2, (wxTraceMask, wxTraceMask),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
+ 2, (wxTraceMask, const wxCStrData&),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
+ 2, (wxTraceMask, const char *),
+ (f1, wxFormatString(f2)))
+ WX_VARARG_WATCOM_WORKAROUND(void, LogTrace,
+ 2, (wxTraceMask, const wchar_t *),
+ (f1, wxFormatString(f2)))
+#endif // WXWIN_COMPATIBILITY_2_8
+#endif // __WATCOMC__