Code::Blocks  SVN r11506
pipedprocess.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  */
5 
6 #ifndef PIPEDPROCESS_H
7 #define PIPEDPROCESS_H
8 
9 #include <wx/process.h> // inheriting class' header file
10 #include <wx/txtstrm.h>
11 #include <wx/timer.h>
12 
13 #include "settings.h"
14 
15 /*
16  * No description
17  */
19 {
20  public:
21  // class constructor
22  PipedProcess(PipedProcess** pvThis, wxEvtHandler* parent, int id = wxID_ANY,
23  bool pipe = true, const wxString& dir = wxEmptyString, int index = -1);
24  // class destructor
25  ~PipedProcess() override;
26  virtual int Launch(const wxString& cmd, unsigned int pollingInterval = 100);
27  virtual void SendString(const wxString& text);
28  virtual bool HasInput();
29  virtual int GetPid(){ return m_Pid; }
30  void ForfeitStreams();
31  protected:
32  void OnTerminate(int pid, int status) override;
33  virtual void OnTimer(wxTimerEvent& event);
34  virtual void OnIdle(wxIdleEvent& event);
35  protected:
38  int m_Id;
39  int m_Pid;
40 
46  int m_Index;
47 
48  bool m_Stopped;
49  private:
51  DECLARE_EVENT_TABLE()
52 };
53 
54 #endif // PIPEDPROCESS_H
virtual int GetPid()
Definition: pipedprocess.h:29
wxEvtHandler * m_Parent
Definition: pipedprocess.h:36
wxTimer m_timerPollProcess
Definition: pipedprocess.h:37
virtual void OnTerminate(int pid, int status)
#define DLLIMPORT
Definition: settings.h:16
wxString wxEmptyString
PipedProcess ** m_pvThis
Definition: pipedprocess.h:50
int m_Index
When there are multiple processes started you could use this to distinguish between different process...
Definition: pipedprocess.h:46