HCE project C++ developers source code library  1.1.1
HCE project developer library
 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(""), environments(), timeout(0), tmode(0)
12 {
13 }
14 //-----------------------------------------------------------------------------
16 : sessionType(SessionType::stHostShell), port(0), userName(""), userPassword(""), shellName(""), environments(), timeout(0), tmode(0)
17 {
18  (*this) = rhs;
19 }
20 //-----------------------------------------------------------------------------
22 : sessionType(SessionType::stHostShell), port(0), userName(""), userPassword(""), shellName(""), environments(), timeout(0), tmode(0)
23 {
24  (*this) = std::forward<SessionOptions>(rhs);
25 }
26 //-----------------------------------------------------------------------------
28 {
29  if (this!=&rhs)
30  {
32  port = rhs.port;
33  userName = rhs.userName;
35  shellName = rhs.shellName;
37  timeout = rhs.timeout;
38  tmode = rhs.tmode;
39  }
40  return *this;
41 }
42 //-----------------------------------------------------------------------------
44 {
45 if (this!=&rhs)
46  {
47  sessionType = std::move(rhs.sessionType);
48  port = std::move(rhs.port);
49  userName = std::move(rhs.userName);
50  userPassword = std::move(rhs.userPassword);
51  shellName = std::move(rhs.shellName);
52  environments = std::move(rhs.environments);
53  timeout = std::move(rhs.timeout);
54  tmode = std::move(rhs.tmode);
55  }
56  return *this;
57 }
58 //-----------------------------------------------------------------------------
60 {
61  sessionType = SessionType::stHostShell;
62  port = 0;
63  userName.clear();
64  userPassword.clear();
65  shellName.clear();
66  environments.clear();
67  timeout = 0;
68  tmode = 0;
69 }
70 //-----------------------------------------------------------------------------
71 //-----------------------------------------------------------------------------
72 } // namespace drce
73 } // namespace HCE