hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CommandResultData.cpp
Go to the documentation of this file.
1 #include "CommandResultData.hpp"
2 
3 namespace HCE
4 {
5 //-----------------------------------------------------------------------------
7 : outStream(""), errStream(""), exitStatus(0), isError(false), processId(0)
8 {
9 }
10 //-----------------------------------------------------------------------------
12 : outStream(""), errStream(""), exitStatus(0), isError(false), processId(0)
13 {
14  *this = rhs;
15 }
16 //-----------------------------------------------------------------------------
18 {
19  if(this != &rhs)
20  {
21  CommandResultData& ref = const_cast<CommandResultData&>(rhs);
22  outStream.str(ref.getOutStream().str());
23  errStream.str(ref.getErrStream().str());
24  exitStatus = ref.getExitStatus();
25  isError = ref .getIsError();
26  processId = ref.getProcessId();
27  }
28  return *this;
29 }
30 //-----------------------------------------------------------------------------
32 {
33  outStream.str("");
34  errStream.str("");
35  exitStatus = 0;
36  isError = false;
37  processId = 0;
38 }
39 //-----------------------------------------------------------------------------
40 void CommandResultData::setOutStream(const std::string& stdOut)
41 {
42  outStream.str(stdOut);
43 }
44 //-----------------------------------------------------------------------------
45 void CommandResultData::setOutStream(const std::stringstream& outStream_)
46 {
47  outStream.str(outStream_.str());
48 }
49 //-----------------------------------------------------------------------------
50 void CommandResultData::setErrStream(const std::string& stdErr)
51 {
52  errStream.str(stdErr);
53 }
54 //-----------------------------------------------------------------------------
55 void CommandResultData::setErrStream(const std::stringstream& errStream_)
56 {
57  errStream.str(errStream_.str());
58 }
59 //-----------------------------------------------------------------------------
60 //-----------------------------------------------------------------------------
61 } // end namespace HCE