-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGcovProcess.cpp
More file actions
53 lines (44 loc) · 886 Bytes
/
GcovProcess.cpp
File metadata and controls
53 lines (44 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include "GcovProcess.h"
#include "cbGcov.h"
#include <wx/txtstrm.h>
GcovProcess::GcovProcess(cbGcov *parent):
wxProcess(parent)
{
//ctor
wxASSERT(parent);
m_parent = parent;
//turn on redirect
Redirect();
m_Id = 0;
}
GcovProcess::~GcovProcess()
{
//dtor
}
/**
* @brief Sets identifier for the process
*
*/
void GcovProcess::SetId(unsigned int id)
{
m_Id = id;
}
/**
* @brief Reads the process stdoutput
*
*/
bool GcovProcess::ReadProcessOutput()
{
//wxProcess::GetInputStream() will capture stdout!
if (IsInputAvailable())
{
wxTextInputStream ts(*GetInputStream());
wxString line = ts.ReadLine();
if(line.Length())
{
m_parent->OnProcessGeneratedOutputLine(line,m_Id);
}
return true;
}
return false;
}