hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCESessionOptions.cpp
Go to the documentation of this file.
1 #include <utility>
2 
3 #include "DRCESessionOptions.hpp"
4 
5 namespace HCE
6 {
7 namespace drce
8 {
9 //-----------------------------------------------------------------------------
11 : sessionType(SessionType::stHostShell), port(0), userName(""), userPassword(""), shellName(""),
12  environments(), homeDir(""), timeout(0), tmode(ThreadMode::tmSync), timeMax(0), cleanup(CleanupFlag::cfNotDelete)
13 {
14 }
15 //-----------------------------------------------------------------------------
17 : sessionType(SessionType::stHostShell), port(0), userName(""), userPassword(""), shellName(""),
18  environments(), homeDir(""), timeout(0), tmode(ThreadMode::tmSync), timeMax(0), cleanup(CleanupFlag::cfNotDelete)
19 {
20  (*this) = rhs;
21 }
22 //-----------------------------------------------------------------------------
24 : sessionType(SessionType::stHostShell), port(0), userName(""), userPassword(""), shellName(""),
25  environments(), homeDir(""), timeout(0), tmode(ThreadMode::tmSync), timeMax(0), cleanup(CleanupFlag::cfNotDelete)
26 {
27  (*this) = std::forward<SessionOptions>(rhs);
28 }
29 //-----------------------------------------------------------------------------
31 {
32  if (this!=&rhs)
33  {
35  port = rhs.port;
36  userName = rhs.userName;
38  shellName = rhs.shellName;
40  homeDir = rhs.homeDir;
41  timeout = rhs.timeout;
42  tmode = rhs.tmode;
43  timeMax = rhs.timeMax;
44  cleanup = rhs.cleanup;
45  }
46  return *this;
47 }
48 //-----------------------------------------------------------------------------
50 {
51 if (this!=&rhs)
52  {
53  sessionType = std::move(rhs.sessionType);
54  port = std::move(rhs.port);
55  userName = std::move(rhs.userName);
56  userPassword = std::move(rhs.userPassword);
57  shellName = std::move(rhs.shellName);
58  environments = std::move(rhs.environments);
59  homeDir = std::move(rhs.homeDir);
60  timeout = std::move(rhs.timeout);
61  tmode = std::move(rhs.tmode);
62  timeMax = std::move(rhs.timeMax);
63  cleanup = std::move(rhs.cleanup);
64  }
65  return *this;
66 }
67 //-----------------------------------------------------------------------------
69 {
70  sessionType = SessionType::stHostShell;
71  port = 0;
72  userName.clear();
73  userPassword.clear();
74  shellName.clear();
75  environments.clear();
76  homeDir.clear();
77  timeout = 0;
78  tmode = ThreadMode::tmSync;
79  timeMax = 0;
80  cleanup = CleanupFlag::cfNotDelete;
81 }
82 //-----------------------------------------------------------------------------
83 //-----------------------------------------------------------------------------
84 } // namespace drce
85 } // namespace HCE