PgmResult.hh
959 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
/*
* PgmResult.hh
*
* Created on: Jan 10, 2013
* Author: f.casimir
*/
#ifndef PGMRESULT_HH_
#define PGMRESULT_HH_
#include <stdio.h> /* defines FILENAME_MAX */
namespace AMDA {
namespace CSlimFixtures {
/**
* @class PgmResult
* @brief Storage of the result of command executed by TestCommandLine.
*/
class PgmResult {
public:
/**
* Constructor
* @brief create 2 temporaries files with unique name for stderr and stdout.
*/
PgmResult();
/**
* Destructor
* @brief remove the 2 temporaries files for stderr and stdout.
*/
virtual ~PgmResult();
/**
* Display into stderr the stderr of the command execution.
*/
void displayStdErr();
/**
* Display into stdout the stdout of the command execution.
*/
void displayStdOut();
int _result;
std::string _alias;
std::string _cmd;
std::string _stdOutFile;
std::string _stdErrFile;
};
} /* namespace CSlimFixtures */
} /* namespace AMDA */
#endif /* PGMRESULT_HH_ */