hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CommandResultData.hpp
Go to the documentation of this file.
1 
14 #ifndef COMMAND_RESULT_DATA_HPP
15 #define COMMAND_RESULT_DATA_HPP
16 
17 #include <sstream>
18 
19 namespace HCE
20 {
21 //-----------------------------------------------------------------------------
23 {
24 public:
25  CommandResultData(void);
28 
30 
31  void clear(void);
32 
33  void setOutStream(const std::string& stdOut);
34  void setOutStream(const std::stringstream& outStream_);
35  std::stringstream& getOutStream(void) {return outStream;}
36 
37  void setErrStream(const std::string& stdErr);
38  void setErrStream(const std::stringstream& errStream_);
39  std::stringstream& getErrStream(void) {return errStream;}
40 
41  void setExitStatus(unsigned int exitStatus_) {exitStatus=exitStatus_;}
42  unsigned int getExitStatus(void) const {return exitStatus;}
43 
44  void setIsError(bool isError_) {isError=isError_;}
45  bool getIsError(void) const {return isError;}
46 
47  void setProcessId(pid_t processId_) {processId=processId_;}
48  pid_t getProcessId(void) const {return processId;}
49 private:
50  std::stringstream outStream;
51  std::stringstream errStream;
52  unsigned int exitStatus;
53  bool isError;
54  pid_t processId;
55 };
56 //-----------------------------------------------------------------------------
57 //-----------------------------------------------------------------------------
58 } // end namespace HCE
59 
60 #endif // COMMAND_RESULT_DATA_HPP