X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..574be073c070a9bbe81ad68e98187b0b9e82c2df:/interface/wx/debugrpt.h?ds=sidebyside diff --git a/interface/wx/debugrpt.h b/interface/wx/debugrpt.h index bb40cb1997..7a3a73b9d7 100644 --- a/interface/wx/debugrpt.h +++ b/interface/wx/debugrpt.h @@ -8,7 +8,6 @@ /** @class wxDebugReportPreview - @wxheader{debugrpt.h} This class presents the debug report to the user and allows him to veto report entirely or remove some parts of it. Although not mandatory, using @@ -45,14 +44,13 @@ public: chose to cancel report generation or removed all files from it. */ - virtual bool Show(wxDebugReport& dbgrpt) const; + virtual bool Show(wxDebugReport& dbgrpt) const = 0; }; /** @class wxDebugReportCompress - @wxheader{debugrpt.h} wxDebugReportCompress is a wxDebugReport which compresses all the files in this debug report into a single ZIP file in its wxDebugReport::Process() @@ -73,14 +71,13 @@ public: Returns the full path of the compressed file (empty if creation failed). */ - const wxString GetCompressedFileName() const; + const wxString& GetCompressedFileName() const; }; /** @class wxDebugReport - @wxheader{debugrpt.h} wxDebugReport is used to generate a debug report, containing information about the program current state. It is usually used from @@ -138,7 +135,7 @@ public: constructor with all the files it contains. Call Reset() to prevent this from happening. */ - ~wxDebugReport(); + virtual ~wxDebugReport(); /** Adds all available information to the report. Currently this includes a @@ -151,7 +148,7 @@ public: Add an XML file containing the current or exception context and the stack trace. */ - bool AddContext(Context ctx); + virtual bool AddContext(Context ctx); /** The same as calling AddContext(Context_Current). @@ -170,7 +167,7 @@ public: (@c dbghlp32.dll can be installed under older systems to make minidumps available). */ - bool AddDump(Context ctx); + virtual bool AddDump(Context ctx); /** The same as calling AddContext(Context_Exception). @@ -191,7 +188,7 @@ public: @see GetDirectory(), AddText() */ - void AddFile(const wxString& filename, const wxString& description); + virtual void AddFile(const wxString& filename, const wxString& description); /** This is a convenient wrapper around AddFile(). It creates the file with @@ -204,30 +201,6 @@ public: bool AddText(const wxString& filename, const wxString& text, const wxString& description); - /** - This function may be overridden to add arbitrary custom context to the - XML context file created by AddContext(). By default, it does nothing. - */ - void DoAddCustomContext(wxXmlNode* nodeRoot); - - /** - This function may be overridden to modify the contents of the exception - tag in the XML context file. - */ - bool DoAddExceptionInfo(wxXmlNode* nodeContext); - - /** - This function may be overridden to modify the contents of the modules - tag in the XML context file. - */ - bool DoAddLoadedModules(wxXmlNode* nodeModules); - - /** - This function may be overridden to modify the contents of the system - tag in the XML context file. - */ - bool DoAddSystemInfo(wxXmlNode* nodeSystemInfo); - /** This method should be used to construct the full name of the files which you wish to add to the report using AddFile(). @@ -235,7 +208,7 @@ public: @return The name of the temporary directory used for the files in this report. */ - const wxString GetDirectory() const; + const wxString& GetDirectory() const; /** Retrieves the name (relative to GetDirectory()) and the description of @@ -253,7 +226,7 @@ public: Gets the name used as a base name for various files, by default wxApp::GetAppName() is used. */ - wxString GetReportName() const; + virtual wxString GetReportName() const; /** Returns @true if the object was successfully initialized. If this @@ -280,13 +253,38 @@ public: after this as it becomes uninitialized and invalid. */ void Reset(); + +protected: + + /** + This function may be overridden to add arbitrary custom context to the + XML context file created by AddContext(). By default, it does nothing. + */ + virtual void DoAddCustomContext(wxXmlNode* nodeRoot); + + /** + This function may be overridden to modify the contents of the exception + tag in the XML context file. + */ + virtual bool DoAddExceptionInfo(wxXmlNode* nodeContext); + + /** + This function may be overridden to modify the contents of the modules + tag in the XML context file. + */ + virtual bool DoAddLoadedModules(wxXmlNode* nodeModules); + + /** + This function may be overridden to modify the contents of the system + tag in the XML context file. + */ + virtual bool DoAddSystemInfo(wxXmlNode* nodeSystemInfo); }; /** @class wxDebugReportPreviewStd - @wxheader{debugrpt.h} wxDebugReportPreviewStd is a standard debug report preview window. It displays a dialog allowing the user to examine the contents of a debug @@ -315,7 +313,6 @@ public: /** @class wxDebugReportUpload - @wxheader{debugrpt.h} This class is used to upload a compressed file using HTTP POST request. As this class derives from wxDebugReportCompress, before upload the report is @@ -340,12 +337,13 @@ public: const wxString& action, const wxString& curl = "curl"); +protected: /** This function may be overridden in a derived class to show the output from curl: this may be an HTML page or anything else that the server returned. Value returned by this function becomes the return value of wxDebugReport::Process(). */ - bool OnServerReply(const wxArrayString& reply); + virtual bool OnServerReply(const wxArrayString& reply); };