1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        PipeExecute.h
3 // Purpose:     Pipe execute
4 // Author:      Alex Thuering
5 // Created:     23.08.2004
6 // RCS-ID:      $Id: PipeExecute.h,v 1.2 2006/11/06 08:34:27 ntalex Exp $
7 // Copyright:   (c) Alex Thuering
8 // Licence:     wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10 
11 #ifndef PIPE_EXECUTE_H
12 #define PIPE_EXECUTE_H
13 
14 #include <wx/string.h>
15 
16 /** Executes pipe commands and optional read input from file
17   * and write output to other file.
18   * It also allow you to process output messages f.e. for logging.
19   */
20 class wxPipeExecute
21 {
22   public:
~wxPipeExecute()23     virtual ~wxPipeExecute() {}
24 	bool Execute(wxString command, wxString inputFile = wxEmptyString,
25 	  wxString outputFile = wxEmptyString);
26 	virtual void ProcessOutput(wxString line) = 0;
27 	virtual bool IsCanceled() = 0;
28 };
29 
30 #endif // PIPE_EXECUTE_H
31