| 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 QOPCUAATTRIBUTEOPERAND_H | 
| 5 | #define QOPCUAATTRIBUTEOPERAND_H | 
| 6 | |
| 7 | #include <QtOpcUa/qopcuaglobal.h> | 
| 8 | #include <QtOpcUa/qopcuatype.h> | 
| 9 | |
| 10 | #include <QtCore/qshareddata.h> | 
| 11 | |
| 12 | QT_BEGIN_NAMESPACE | 
| 13 | |
| 14 | class QOpcUaRelativePathElement; | 
| 15 | |
| 16 | class QVariant; | 
| 17 | class QOpcUaRelativePathElement; | 
| 18 | |
| 19 | // OPC UA 1.05 part 4, 7.7.4.4 | 
| 20 | class QOpcUaAttributeOperandData; | 
| 21 | class Q_OPCUA_EXPORT QOpcUaAttributeOperand | 
| 22 | { | 
| 23 | public: | 
| 24 | QOpcUaAttributeOperand(); | 
| 25 | QOpcUaAttributeOperand(const QOpcUaAttributeOperand &); | 
| 26 | QOpcUaAttributeOperand &operator=(const QOpcUaAttributeOperand &); | 
| 27 | operator QVariant() const; | 
| 28 | ~QOpcUaAttributeOperand(); | 
| 29 | |
| 30 | QString nodeId() const; | 
| 31 | void setNodeId(const QString &nodeId); | 
| 32 | |
| 33 | QString alias() const; | 
| 34 | void setAlias(const QString &alias); | 
| 35 | |
| 36 | QList<QOpcUaRelativePathElement> browsePath() const; | 
| 37 | QList<QOpcUaRelativePathElement> &browsePathRef(); | 
| 38 | void setBrowsePath(const QList<QOpcUaRelativePathElement> &browsePath); | 
| 39 | |
| 40 | QOpcUa::NodeAttribute attributeId() const; | 
| 41 | void setAttributeId(QOpcUa::NodeAttribute attributeId); | 
| 42 | |
| 43 | QString indexRange() const; | 
| 44 | void setIndexRange(const QString &indexRange); | 
| 45 | |
| 46 | private: | 
| 47 | friend Q_OPCUA_EXPORT bool comparesEqual(const QOpcUaAttributeOperand &lhs, | 
| 48 | const QOpcUaAttributeOperand &rhs) noexcept; | 
| 49 | friend bool operator==(const QOpcUaAttributeOperand &lhs, | 
| 50 | const QOpcUaAttributeOperand &rhs) noexcept | 
| 51 | { return comparesEqual(lhs, rhs); } | 
| 52 | friend bool operator!=(const QOpcUaAttributeOperand &lhs, | 
| 53 | const QOpcUaAttributeOperand &rhs) noexcept | 
| 54 | { | 
| 55 | return !(lhs == rhs); | 
| 56 | } | 
| 57 | |
| 58 | QSharedDataPointer<QOpcUaAttributeOperandData> data; | 
| 59 | }; | 
| 60 | |
| 61 | QT_END_NAMESPACE | 
| 62 | |
| 63 | Q_DECLARE_METATYPE(QOpcUaAttributeOperand) | 
| 64 | |
| 65 | #endif // QOPCUAATTRIBUTEOPERAND_H | 
| 66 | 
