X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/707c4418929f09dfd8f5fb0f0d5aec3bb0775bd8..3e97a905185a72c04a7feb67c7885ab4412100ee:/include/wx/debugrpt.h diff --git a/include/wx/debugrpt.h b/include/wx/debugrpt.h index 92bb2287ee..86ecdb5ab3 100644 --- a/include/wx/debugrpt.h +++ b/include/wx/debugrpt.h @@ -13,9 +13,12 @@ #include "wx/defs.h" -#if wxUSE_DEBUGREPORT +#if wxUSE_DEBUGREPORT && wxUSE_XML -class WXDLLIMPEXP_XML wxXmlNode; +#include "wx/string.h" +#include "wx/arrstr.h" + +class WXDLLIMPEXP_FWD_XML wxXmlNode; // ---------------------------------------------------------------------------- // wxDebugReport: generate a debug report, processing is done in derived class @@ -48,11 +51,19 @@ public: void Reset() { m_dir.clear(); } - // add another file to the report: the file must already exist, its name is - // relative to GetDirectory() + // add another file to the report: the file must already exist, its name + // can be either absolute in which case it is copied to the debug report + // directory or relative to GetDirectory() // // description is shown to the user in the report summary - virtual void AddFile(const wxString& name, const wxString& description); + virtual void AddFile(const wxString& filename, const wxString& description); + + // convenience function: write the given text to a file with the given name + // and then add it to the report (the difference with AddFile() is that the + // file will be created by this function and doesn't have to already exist) + bool AddText(const wxString& filename, + const wxString& text, + const wxString& description); #if wxUSE_STACKWALKER // add an XML file containing the current or exception context and the @@ -219,7 +230,6 @@ public: #endif // wxUSE_GUI -#endif // wxUSE_DEBUGREPORT +#endif // wxUSE_DEBUGREPORT && wxUSE_XML #endif // _WX_DEBUGRPT_H_ -