10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
ClientProperties.h
1#ifndef TENDUKE_EE_CLIENTPROPERTIES_H
2#define TENDUKE_EE_CLIENTPROPERTIES_H
3
4#include <string>
5
6namespace tenduke { namespace ee {
7
14{
15public:
20 : ClientProperties("", "", "", "")
21 {}
22
31 const std::string &hardwareId,
32 const std::string &hardwareName,
33 const std::string &processId,
34 const std::string &processName
39 {}
40
45 bool hasHardwareId() const
46 {
47 return !hardwareId.empty();
48 }
49
54 bool hasHardwareName() const
55 {
56 return !hardwareName.empty();
57 }
58
63 bool hasProcessId() const
64 {
65 return !processId.empty();
66 }
67
72 bool hasProcessName() const
73 {
74 return !processName.empty();
75 }
76
77
78public:
83 const std::string hardwareId;
84
87 const std::string hardwareName;
88
95 const std::string processId;
96
98 const std::string processName;
99
100public:
105 {
106 public:
112 Builder & hardwareId(const std::string &pHardwareId)
113 {
114 this->theHardwareId = pHardwareId;
115 return *this;
116 }
122 Builder & hardwareName(const std::string &pHardwareName)
123 {
124 this->theHardwareName = pHardwareName;
125 return *this;
126 }
132 Builder & processId(const std::string &pProcessId)
133 {
134 this->theProcessId = pProcessId;
135 return *this;
136 }
142 Builder & processName(const std::string &pProcessName)
143 {
144 this->theProcessName = pProcessName;
145 return *this;
146 }
147
153 {
154 return ClientProperties(
155 theHardwareId,
156 theHardwareName,
157 theProcessId,
158 theProcessName
159 );
160 }
161
162 private:
163 std::string theHardwareId;
164 std::string theHardwareName;
165 std::string theProcessId;
166 std::string theProcessName;
167 };
168};
169
170}}
171
172#endif //TENDUKE_EE_CLIENTPROPERTIES_H
Builds the configuration fluently.
Definition ClientProperties.h:105
Builder & hardwareName(const std::string &pHardwareName)
Fluently sets hardware name.
Definition ClientProperties.h:122
Builder & processId(const std::string &pProcessId)
Fluently sets process id.
Definition ClientProperties.h:132
Builder & processName(const std::string &pProcessName)
Fluently sets process name.
Definition ClientProperties.h:142
Builder & hardwareId(const std::string &pHardwareId)
Fluently sets hardware id.
Definition ClientProperties.h:112
ClientProperties build()
Builds the properties.
Definition ClientProperties.h:152
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4
Client properties.
Definition ClientProperties.h:14
const std::string processId
The process ID of the client application requesting the license.
Definition ClientProperties.h:95
ClientProperties(const std::string &hardwareId, const std::string &hardwareName, const std::string &processId, const std::string &processName)
Constructs new instance.
Definition ClientProperties.h:30
bool hasHardwareId() const
Checks if ClientProperties.hardwareId has been configured.
Definition ClientProperties.h:45
const std::string hardwareName
A human-readable name of the hardware or device.
Definition ClientProperties.h:87
bool hasProcessName() const
Checks if ClientProperties.processName has been configured.
Definition ClientProperties.h:72
bool hasHardwareName() const
Checks if ClientProperties.hardwareName has been configured.
Definition ClientProperties.h:54
ClientProperties()
No-arg constructs new instance without any properties.
Definition ClientProperties.h:19
bool hasProcessId() const
Checks if ClientProperties.processId has been configured.
Definition ClientProperties.h:63
const std::string hardwareId
The hardware ID of the client device.
Definition ClientProperties.h:83
const std::string processName
The name of the client application requesting the license.
Definition ClientProperties.h:98