Code::Blocks
SVN r11506
include
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
*/
18
class
DLLIMPORT
PipedProcess
:
public
wxProcess
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
:
36
wxEvtHandler
*
m_Parent
;
37
wxTimer
m_timerPollProcess
;
38
int
m_Id
;
39
int
m_Pid
;
40
46
int
m_Index
;
47
48
bool
m_Stopped
;
49
private
:
50
PipedProcess
**
m_pvThis
;
51
DECLARE_EVENT_TABLE()
52
};
53
54
#endif // PIPEDPROCESS_H
timer.h
PipedProcess::m_Id
int m_Id
Definition:
pipedprocess.h:38
PipedProcess
Definition:
pipedprocess.h:18
wxTimer
wxIdleEvent
PipedProcess::GetPid
virtual int GetPid()
Definition:
pipedprocess.h:29
PipedProcess::m_Pid
int m_Pid
Definition:
pipedprocess.h:39
txtstrm.h
PipedProcess::m_Parent
wxEvtHandler * m_Parent
Definition:
pipedprocess.h:36
PipedProcess::m_timerPollProcess
wxTimer m_timerPollProcess
Definition:
pipedprocess.h:37
wxProcess::OnTerminate
virtual void OnTerminate(int pid, int status)
process.h
DLLIMPORT
#define DLLIMPORT
Definition:
settings.h:16
settings.h
wxString
wxID_ANY
wxEmptyString
wxString wxEmptyString
PipedProcess::m_Stopped
bool m_Stopped
Definition:
pipedprocess.h:48
PipedProcess::m_pvThis
PipedProcess ** m_pvThis
Definition:
pipedprocess.h:50
wxProcess
wxEvtHandler
PipedProcess::m_Index
int m_Index
When there are multiple processes started you could use this to distinguish between different process...
Definition:
pipedprocess.h:46
wxTimerEvent
Generated by
1.8.13