1 | // Copyright (C) 2023 basysKom GmbH, opensource@basyskom.com |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include <QtOpcUa/qopcuatype.h> |
5 | |
6 | #include <QtCore/qshareddata.h> |
7 | #include <QtCore/qstringfwd.h> |
8 | |
9 | #ifndef QOPCUADIAGNOSTICINFO_H |
10 | #define QOPCUADIAGNOSTICINFO_H |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | class QVariant; |
15 | |
16 | class QOpcUaDiagnosticInfoData; |
17 | QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QOpcUaDiagnosticInfoData, Q_OPCUA_EXPORT) |
18 | class QOpcUaDiagnosticInfo { |
19 | public: |
20 | Q_OPCUA_EXPORT QOpcUaDiagnosticInfo(); |
21 | Q_OPCUA_EXPORT ~QOpcUaDiagnosticInfo(); |
22 | Q_OPCUA_EXPORT QOpcUaDiagnosticInfo(const QOpcUaDiagnosticInfo &other); |
23 | QOpcUaDiagnosticInfo(QOpcUaDiagnosticInfo &&other) noexcept = default; |
24 | Q_OPCUA_EXPORT QOpcUaDiagnosticInfo &operator=(const QOpcUaDiagnosticInfo &rhs); |
25 | void swap(QOpcUaDiagnosticInfo &other) noexcept |
26 | { data.swap(other&: other.data); } |
27 | QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QOpcUaDiagnosticInfo) |
28 | |
29 | Q_OPCUA_EXPORT operator QVariant() const; |
30 | |
31 | Q_OPCUA_EXPORT qint32 symbolicId() const; |
32 | Q_OPCUA_EXPORT void setSymbolicId(qint32 newSymbolicId); |
33 | |
34 | Q_OPCUA_EXPORT bool hasSymbolicId() const; |
35 | Q_OPCUA_EXPORT void setHasSymbolicId(bool newHasSymbolicId); |
36 | |
37 | Q_OPCUA_EXPORT qint32 namespaceUri() const; |
38 | Q_OPCUA_EXPORT void setNamespaceUri(qint32 newNamespaceUri); |
39 | |
40 | Q_OPCUA_EXPORT bool hasNamespaceUri() const; |
41 | Q_OPCUA_EXPORT void setHasNamespaceUri(bool newHasNamespaceUri); |
42 | |
43 | Q_OPCUA_EXPORT qint32 locale() const; |
44 | Q_OPCUA_EXPORT void setLocale(qint32 newLocale); |
45 | |
46 | Q_OPCUA_EXPORT bool hasLocale() const; |
47 | Q_OPCUA_EXPORT void setHasLocale(bool newHasLocale); |
48 | |
49 | Q_OPCUA_EXPORT qint32 localizedText() const; |
50 | Q_OPCUA_EXPORT void setLocalizedText(qint32 newLocalizedText); |
51 | |
52 | Q_OPCUA_EXPORT bool hasLocalizedText() const; |
53 | Q_OPCUA_EXPORT void setHasLocalizedText(bool newHasLocalizedText); |
54 | |
55 | Q_OPCUA_EXPORT QString additionalInfo() const; |
56 | Q_OPCUA_EXPORT void setAdditionalInfo(const QString &newAdditionalInfo); |
57 | |
58 | Q_OPCUA_EXPORT bool hasAdditionalInfo() const; |
59 | Q_OPCUA_EXPORT void setHasAdditionalInfo(bool newHasAdditionalInfo); |
60 | |
61 | Q_OPCUA_EXPORT QOpcUa::UaStatusCode innerStatusCode() const; |
62 | Q_OPCUA_EXPORT void setInnerStatusCode(QOpcUa::UaStatusCode newInnerStatusCode); |
63 | |
64 | Q_OPCUA_EXPORT bool hasInnerStatusCode() const; |
65 | Q_OPCUA_EXPORT void setHasInnerStatusCode(bool newHasInnerStatusCode); |
66 | |
67 | Q_OPCUA_EXPORT QOpcUaDiagnosticInfo innerDiagnosticInfo() const; |
68 | Q_OPCUA_EXPORT QOpcUaDiagnosticInfo &innerDiagnosticInfoRef(); |
69 | Q_OPCUA_EXPORT void setInnerDiagnosticInfo(const QOpcUaDiagnosticInfo &newInnerDiagnosticInfo); |
70 | |
71 | Q_OPCUA_EXPORT bool hasInnerDiagnosticInfo() const; |
72 | Q_OPCUA_EXPORT void setHasInnerDiagnosticInfo(bool newHasInnerDiagnosticInfo); |
73 | |
74 | private: |
75 | QExplicitlySharedDataPointer<QOpcUaDiagnosticInfoData> data; |
76 | |
77 | friend Q_OPCUA_EXPORT bool comparesEqual(const QOpcUaDiagnosticInfo &lhs, |
78 | const QOpcUaDiagnosticInfo &rhs) noexcept; |
79 | friend bool operator==(const QOpcUaDiagnosticInfo &lhs, |
80 | const QOpcUaDiagnosticInfo &rhs) noexcept |
81 | { return comparesEqual(lhs, rhs); } |
82 | friend bool operator!=(const QOpcUaDiagnosticInfo &lhs, |
83 | const QOpcUaDiagnosticInfo &rhs) noexcept |
84 | { |
85 | return !(lhs == rhs); |
86 | } |
87 | }; |
88 | |
89 | Q_DECLARE_SHARED(QOpcUaDiagnosticInfo) |
90 | |
91 | QT_END_NAMESPACE |
92 | |
93 | #endif // QOPCUADIAGNOSTICINFO_H |
94 | |