| 1 | // Copyright (C) 2015 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 | #ifndef QOPCUAELEMENTOPERAND_H |
| 5 | #define QOPCUAELEMENTOPERAND_H |
| 6 | |
| 7 | #include <QtOpcUa/qopcuaglobal.h> |
| 8 | |
| 9 | #include <QtCore/qshareddata.h> |
| 10 | #include <QtCore/qvariant.h> |
| 11 | |
| 12 | QT_BEGIN_NAMESPACE |
| 13 | |
| 14 | // OPC UA 1.05 part 4, 7.7.4.2 |
| 15 | class QOpcUaElementOperandData; |
| 16 | class Q_OPCUA_EXPORT QOpcUaElementOperand |
| 17 | { |
| 18 | public: |
| 19 | QOpcUaElementOperand(); |
| 20 | QOpcUaElementOperand(const QOpcUaElementOperand &); |
| 21 | QOpcUaElementOperand(quint32 index); |
| 22 | QOpcUaElementOperand &operator=(const QOpcUaElementOperand &); |
| 23 | operator QVariant() const; |
| 24 | ~QOpcUaElementOperand(); |
| 25 | |
| 26 | quint32 index() const; |
| 27 | void setIndex(quint32 index); |
| 28 | |
| 29 | private: |
| 30 | friend Q_OPCUA_EXPORT bool comparesEqual(const QOpcUaElementOperand &lhs, |
| 31 | const QOpcUaElementOperand &rhs) noexcept; |
| 32 | friend bool operator==(const QOpcUaElementOperand &lhs, |
| 33 | const QOpcUaElementOperand &rhs) noexcept |
| 34 | { return comparesEqual(lhs, rhs); } |
| 35 | friend bool operator!=(const QOpcUaElementOperand &lhs, |
| 36 | const QOpcUaElementOperand &rhs) noexcept |
| 37 | { |
| 38 | return !(lhs == rhs); |
| 39 | } |
| 40 | |
| 41 | QSharedDataPointer<QOpcUaElementOperandData> data; |
| 42 | }; |
| 43 | |
| 44 | QT_END_NAMESPACE |
| 45 | |
| 46 | Q_DECLARE_METATYPE(QOpcUaElementOperand) |
| 47 | |
| 48 | #endif // QOPCUAELEMENTOPERAND_H |
| 49 |
