hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCEResultData.cpp
Go to the documentation of this file.
1 #include <utility>
2 
3 #include "DRCEResultData.hpp"
4 #include "DRCEError.hpp"
5 
6 namespace HCE
7 {
8 namespace drce
9 {
10 //-----------------------------------------------------------------------------
13  nodeHost(""), nodePort(""), state(0), pid(0), stdoutStream(""), stderrStream(""), nodeName(""), time(0), exitStatus(0), fields()
14 {
15 }
16 //-----------------------------------------------------------------------------
19  nodeHost(""), nodePort(""), state(0), pid(0), stdoutStream(""), stderrStream(""), nodeName(""), time(0), exitStatus(0), fields()
20 {
21  (*this) = rhs;
22 }
23 //-----------------------------------------------------------------------------
26  nodeHost(""), nodePort(""), state(0), pid(0), stdoutStream(""), stderrStream(""), nodeName(""), time(0), exitStatus(0), fields()
27 {
28  (*this) = std::forward<DRCEResultDataItem>(rhs);
29 }
30 //-----------------------------------------------------------------------------
32 {
33  if (this!=&rhs)
34  {
35  errorCode = rhs.getErrorCode();
36  errorMessage = rhs.getErrorMessage();
37  requestId = rhs.getRequestId();
38  requestType = rhs.getRequestType();
39  nodeHost = rhs.getNodeHost();
40  nodePort = rhs.getNodePort();
41  state = rhs.getState();
42  pid = rhs.getPid();
43  stdoutStream = rhs.getStdoutStream();
44  stderrStream = rhs.getStderrStream();
45  nodeName = rhs.getNodeName();
46  time = rhs.getTime();
47  exitStatus = rhs.getExitStatus();
48  fields = rhs.getFields();
49  files = rhs.getFiles();
50  (*dynamic_cast<DRCESubtasksList <DRCEResultDataItem>* >(this)) = static_cast<DRCESubtasksList <DRCEResultDataItem> >(rhs);
51  }
52  return *this;
53 }
54 //-----------------------------------------------------------------------------
56 {
57  if (this!=&rhs)
58  {
59  errorCode = std::move(rhs.getErrorCode());
60  errorMessage = std::move(rhs.getErrorMessage());
61  requestId = std::move(rhs.getRequestId());
62  requestType = std::move(rhs.getRequestType());
63  nodeHost = std::move(rhs.getNodeHost());
64  nodePort = std::move(rhs.getNodePort());
65  state = std::move(rhs.getState());
66  pid = std::move(rhs.getPid());
67  stdoutStream = std::move(rhs.getStdoutStream());
68  stderrStream = std::move(rhs.getStderrStream());
69  nodeName = std::move(rhs.getNodeName());
70  time = std::move(rhs.getTime());
71  exitStatus = std::move(rhs.getExitStatus());
72  fields = std::move(rhs.getFields());
73  files = std::move(rhs.getFiles());
74  items = std::move(rhs.getSubtasks());
75  (*dynamic_cast<DRCESubtasksList <DRCEResultDataItem>* >(this)) = std::move(static_cast<DRCESubtasksList <DRCEResultDataItem> >(rhs));
76  }
77  return *this;
78 }
79 //-----------------------------------------------------------------------------
81 {
82  errorCode = NO_ERROR;
83  errorMessage.clear();
84  requestId = 0;
85  requestType = DRCETaskRequest::RequestType::rtCheckTaskState;
86  nodeHost.clear();
87  nodePort.clear();
88  state = 0;
89  pid = 0;
90  stdoutStream.clear();
91  stderrStream.clear();
92  nodeName.clear();
93  time = 0;
94  exitStatus = 0;
95  fields.clear();
96  files.clear();
98 }
99 //-----------------------------------------------------------------------------
100 //-----------------------------------------------------------------------------
102 : items()
103 {
104 }
105 //-----------------------------------------------------------------------------
107 {
108  (*this) = rhs;
109 }
110 //-----------------------------------------------------------------------------
112 {
113  (*this) = std::forward<DRCEResultData>(rhs);
114 }
115 //-----------------------------------------------------------------------------
117 {
118  if (this!=&rhs)
119  {
120  items = rhs.getItems();
121  }
122  return *this;
123 }
124 //-----------------------------------------------------------------------------
126 {
127  if (this!=&rhs)
128  {
129  items = std::move(rhs.getItems());
130  }
131  return *this;
132 }
133 //-----------------------------------------------------------------------------
135 {
136  items.push_back(dataItem);
137 }
138 //-----------------------------------------------------------------------------
140 {
141  items.push_back(std::move(std::forward<DRCEResultDataItem>(dataItem)));
142 }
143 //-----------------------------------------------------------------------------
145 {
146  return items.size();
147 }
148 //-----------------------------------------------------------------------------
150 {
151  return items[index];
152 }
153 //-----------------------------------------------------------------------------
154 // cppcheck-suppress unusedFunction
156 {
157  items[index] = dataItem;
158 }
159 //-----------------------------------------------------------------------------
161 {
162  items[index] = std::forward<DRCEResultDataItem>(dataItem);
163 }
164 //-----------------------------------------------------------------------------
166 {
167  items.clear();
168 }
169 //-----------------------------------------------------------------------------
170 //-----------------------------------------------------------------------------
171 } // namespace drce
172 } // namespace HCE