wxIScan
wxExtProcessDelTempFile Class Reference

A slightly extended wxExtProcess class that removes a temporary file in its destructor. More...

#include <wxextprocess.h>

Inheritance diagram for wxExtProcessDelTempFile:
wxExtProcess

List of all members.

Public Member Functions

 wxExtProcessDelTempFile (wxEvtHandler *poParent=NULL, int nId=-1, const wxString &strTempFileName=wxEmptyString)
 Standard constructor.
virtual ~wxExtProcessDelTempFile ()
 Virtual destructor. Removes the temporary file.

Protected Attributes

wxString m_strTempFileName
 Holds the name of the temporary file to be removed in the destructor.

Detailed Description

A slightly extended wxExtProcess class that removes a temporary file in its destructor.

This class is usefull if you want to be sure that a possibly existing temporary file should be removed after process termination even it the process was killed by Kill().

Definition at line 92 of file wxextprocess.h.


Constructor & Destructor Documentation

wxExtProcessDelTempFile::wxExtProcessDelTempFile ( wxEvtHandler *  poParent = NULL,
int  nId = -1,
const wxString &  strTempFileName = wxEmptyString 
) [inline]

Standard constructor.

Parameters:
poParenta pointer to the event handler parent
nIdid of the wxEVT_END_PROCESS notification event
strTempFileNamethe file name to remove after termination

Definition at line 100 of file wxextprocess.h.

References m_strTempFileName.

      : wxExtProcess( poParent, nId )
    {
        m_strTempFileName= strTempFileName;
    }
virtual wxExtProcessDelTempFile::~wxExtProcessDelTempFile ( ) [inline, virtual]

Virtual destructor. Removes the temporary file.

Definition at line 108 of file wxextprocess.h.

References m_strTempFileName.

    {
        if( !m_strTempFileName.IsEmpty() && ::wxFileExists( m_strTempFileName ) )
        {
            // Remove the temporary file.
            ::wxRemoveFile( m_strTempFileName );
        }
    }

Member Data Documentation

Holds the name of the temporary file to be removed in the destructor.

Definition at line 118 of file wxextprocess.h.

Referenced by wxExtProcessDelTempFile(), and ~wxExtProcessDelTempFile().


The documentation for this class was generated from the following file: