GoPxL SDK
GoResponseType.h
Go to the documentation of this file.
1 
10 #ifndef GO_PXL_SDK_RESPONSETYPE_H
11 #define GO_PXL_SDK_RESPONSETYPE_H
12 
13 namespace GoPxLSdk
14 {
15 
17 {
18 public:
19  enum Type : k32s
20  {
24  };
25 
26  GoResponseType() = default;
27 
28  constexpr GoResponseType(Type type) : type(type) { }
29 
30  operator Type() const { return type; }
31  constexpr bool operator==(GoResponseType t) const { return type == t.type; }
32  constexpr bool operator==(Type t) const { return type == t; }
33  constexpr bool operator!=(GoResponseType t) const { return type != t.type; }
34  constexpr bool operator!=(Type t) const { return type != t; }
35 
36  static std::string ToString(Type type);
37 
38  static GoResponseType FromString(const std::string& type);
39 
40 private:
41  Type type;
42 };
43 
44 }
45 
46 #endif
constexpr bool operator==(Type t) const
Definition: GoResponseType.h:32
constexpr bool operator!=(Type t) const
Definition: GoResponseType.h:34
static std::string ToString(Type type)
constexpr bool operator!=(GoResponseType t) const
Definition: GoResponseType.h:33
constexpr GoResponseType(Type type)
Definition: GoResponseType.h:28
static GoResponseType FromString(const std::string &type)
Definition: GoResponseType.h:16
A change notification.
Definition: GoResponseType.h:22
A streamed message.
Definition: GoResponseType.h:23
Type
Definition: GoResponseType.h:19
constexpr bool operator==(GoResponseType t) const
Definition: GoResponseType.h:31
A reply to a request (e.g. Read or Update).
Definition: GoResponseType.h:21
Definition: Def.h:46