| Version: 3.3.1

Public Member Functions | List of all members
wxDebugReportCompress Class Reference
Class List by Category » Debugging

`#include <wx/debugrpt.h>`

Inheritance diagram for wxDebugReportCompress:
[legend]

## Detailed Description

wxDebugReportCompress is a wxDebugReport which compresses all the files in this debug report into a single ZIP file in its wxDebugReport::Process() function.

##

Library: wxQA
Category: Debugging

## Public Member Functions
| wxDebugReportCompress ()
| Default constructor does nothing special. More...
void | SetCompressedFileDirectory (const wxString &dir)
| Set the directory where the debug report should be generated. More...
void | SetCompressedFileBaseName (const wxString &name)
| Set the base name of the generated debug report file. More...
const wxString & | GetCompressedFileName () const
| Returns the full path of the compressed file (empty if creation failed). More...
Public Member Functions inherited from wxDebugReport
| wxDebugReport ()
| The constructor creates a temporary directory where the files that will be included in the report are created. More...
virtual | ~wxDebugReport ()
| The destructor normally destroys the temporary directory created in the constructor with all the files it contains. More...
void | AddAll (Context context=Context_Exception)
| Adds all available information to the report. More...
virtual bool | AddContext (Context ctx)
| Add an XML file containing the current or exception context and the stack trace. More...
bool | AddCurrentContext ()
| The same as calling AddContext(Context_Current). More...
bool | AddCurrentDump ()
| The same as calling AddDump(Context_Current). More...
virtual bool | AddDump (Context ctx)
| Adds the minidump file to the debug report. More...
bool | AddExceptionContext ()
| The same as calling AddContext(Context_Exception). More...
bool | AddExceptionDump ()
| The same as calling AddDump(Context_Exception). More...
virtual void | AddFile (const wxString &filename, const wxString &description)
| Add another file to the report. More...
bool | AddText (const wxString &filename, const wxString &text, const wxString &description)
| This is a convenient wrapper around AddFile(). More...
const wxString & | GetDirectory () const
| This method should be used to construct the full name of the files which you wish to add to the report using AddFile(). More...
bool | GetFile (size_t n, wxString *name, wxString *desc) const
| Retrieves the name (relative to GetDirectory()) and the description of the file with the given index. More...
size_t | GetFilesCount () const
| Gets the current number files in this report. More...
virtual wxString | GetReportName () const
| Gets the name used as a base name for various files, by default wxApp::GetAppName() is used. More...
bool | IsOk () const
| Returns true if the object was successfully initialized. More...
bool | Process ()
| Processes this report: the base class simply notifies the user that the report has been generated. More...
void | RemoveFile (const wxString &name)
| Removes the file from report: this is used by wxDebugReportPreview to allow the user to remove files potentially containing private information from the report. More...
void | Reset ()
| Resets the directory name we use. More...

## Additional Inherited Members
Public Types inherited from wxDebugReport
enum | Context { Context_Current , Context_Exception }
| This enum is used for functions that report either the current state or the state during the last (fatal) exception. More...
Protected Member Functions inherited from wxDebugReport
virtual void | DoAddCustomContext (wxXmlNode *nodeRoot)
| This function may be overridden to add arbitrary custom context to the XML context file created by AddContext(). More...
virtual bool | DoAddExceptionInfo (wxXmlNode *nodeContext)
| This function may be overridden to modify the contents of the exception tag in the XML context file. More...
virtual bool | DoAddLoadedModules (wxXmlNode *nodeModules)
| This function may be overridden to modify the contents of the modules tag in the XML context file. More...
virtual bool | DoAddSystemInfo (wxXmlNode *nodeSystemInfo)
| This function may be overridden to modify the contents of the system tag in the XML context file. More...

## Constructor & Destructor Documentation

## ◆ wxDebugReportCompress()

wxDebugReportCompress::wxDebugReportCompress | ( |  | ) |

Default constructor does nothing special.

## Member Function Documentation

## ◆ GetCompressedFileName()

const wxString& wxDebugReportCompress::GetCompressedFileName | ( |  | ) | const

Returns the full path of the compressed file (empty if creation failed).

## ◆ SetCompressedFileBaseName()

void wxDebugReportCompress::SetCompressedFileBaseName | ( | const wxString & | name | ) |

Set the base name of the generated debug report file.

This function is similar to SetCompressedFileDirectory() but allows changing the base name of the file. Notice that the file extension will always be ``.zip.

By default, a unique name constructed from wxApp::GetAppName(), the current process id and the current date and time is used.

Parameters

  name | The base name (i.e. without extension) of the file.

Since
  2.9.1

## ◆ SetCompressedFileDirectory()

void wxDebugReportCompress::SetCompressedFileDirectory | ( | const wxString & | dir | ) |

Set the directory where the debug report should be generated.

By default, the debug report is generated under user temporary files directory. This is usually fine if it is meant to be processed in some way (e.g. automatically uploaded to a remote server) but if the user is asked to manually upload or send the report, it may be more convenient to generate it in e.g. the users home directory and this function allows doing this.

Notice that it should be called before wxDebugReport::Process() or it has no effect.

Parameters

  dir | The full path to an existing directory where the debug report file should be generated.

Since
  2.9.1