moved vararg handling code in wxMessageOutput to single method and added simple Output(wxString) virtual method instead of DoPrintf(format,...)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-04-12 21:13:05 +00:00
parent 7e173fdcef
commit 5b077ec744
2 changed files with 39 additions and 47 deletions

View File

@@ -40,7 +40,8 @@ public:
WX_DEFINE_VARARG_FUNC_VOID(Printf, DoPrintf)
protected:
virtual void DoPrintf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2 = 0;
void DoPrintf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
virtual void Output(const wxString& str) = 0;
};
#ifdef __VISUALC__
@@ -81,7 +82,7 @@ public:
wxMessageOutputBest() { }
protected:
virtual void DoPrintf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
virtual void Output(const wxString& str);
};
// ----------------------------------------------------------------------------
@@ -94,7 +95,7 @@ public:
wxMessageOutputStderr() { }
protected:
virtual void DoPrintf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
virtual void Output(const wxString& str);
};
// ----------------------------------------------------------------------------
@@ -109,7 +110,7 @@ public:
wxMessageOutputMessageBox() { }
protected:
virtual void DoPrintf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
virtual void Output(const wxString& str);
};
#endif // wxUSE_GUI
@@ -124,7 +125,7 @@ public:
wxMessageOutputDebug() { }
protected:
virtual void DoPrintf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
virtual void Output(const wxString& str);
};
// ----------------------------------------------------------------------------
@@ -137,7 +138,7 @@ public:
wxMessageOutputLog() { }
protected:
virtual void DoPrintf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
virtual void Output(const wxString& str);
};
#endif