| 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 QOPCUARELATIVEPATHELEMENT_H | 
| 5 | #define QOPCUARELATIVEPATHELEMENT_H | 
| 6 | |
| 7 | #include <QtOpcUa/qopcuatype.h> | 
| 8 | |
| 9 | #include <QtCore/qshareddata.h> | 
| 10 | |
| 11 | QT_BEGIN_NAMESPACE | 
| 12 | |
| 13 | class QOpcUaQualifiedName; | 
| 14 | |
| 15 | class QOpcUaRelativePathElementData; | 
| 16 | class Q_OPCUA_EXPORT QOpcUaRelativePathElement | 
| 17 | { | 
| 18 | public: | 
| 19 | QOpcUaRelativePathElement(); | 
| 20 | QOpcUaRelativePathElement(const QOpcUaQualifiedName &target, const QString &refType); | 
| 21 | QOpcUaRelativePathElement(const QOpcUaQualifiedName &target, QOpcUa::ReferenceTypeId refType); | 
| 22 | QOpcUaRelativePathElement(const QOpcUaRelativePathElement &); | 
| 23 | QOpcUaRelativePathElement &operator=(const QOpcUaRelativePathElement &); | 
| 24 | #if QT_OPCUA_REMOVED_SINCE(6, 7) | 
| 25 | bool operator==(const QOpcUaRelativePathElement &rhs) const; | 
| 26 | #endif | 
| 27 | ~QOpcUaRelativePathElement(); | 
| 28 | |
| 29 | QString referenceTypeId() const; | 
| 30 | void setReferenceTypeId(const QString &referenceTypeId); | 
| 31 | void setReferenceTypeId(QOpcUa::ReferenceTypeId referenceTypeId); | 
| 32 | |
| 33 | bool isInverse() const; | 
| 34 | void setIsInverse(bool isInverse); | 
| 35 | |
| 36 | bool includeSubtypes() const; | 
| 37 | void setIncludeSubtypes(bool includeSubtypes); | 
| 38 | |
| 39 | operator QVariant() const; | 
| 40 | |
| 41 | QOpcUaQualifiedName targetName() const; | 
| 42 | void setTargetName(const QOpcUaQualifiedName &targetName); | 
| 43 | |
| 44 | private: | 
| 45 | QSharedDataPointer<QOpcUaRelativePathElementData> data; | 
| 46 | |
| 47 | friend Q_OPCUA_EXPORT bool comparesEqual(const QOpcUaRelativePathElement &lhs, | 
| 48 | const QOpcUaRelativePathElement &rhs) noexcept; | 
| 49 | friend bool operator==(const QOpcUaRelativePathElement &lhs, | 
| 50 | const QOpcUaRelativePathElement &rhs) noexcept | 
| 51 | { return comparesEqual(lhs, rhs); } | 
| 52 | friend inline bool operator!=(const QOpcUaRelativePathElement &lhs, | 
| 53 | const QOpcUaRelativePathElement &rhs) noexcept | 
| 54 | { return !comparesEqual(lhs, rhs); } | 
| 55 | }; | 
| 56 | |
| 57 | QT_END_NAMESPACE | 
| 58 | |
| 59 | Q_DECLARE_METATYPE(QOpcUaRelativePathElement) | 
| 60 | |
| 61 | #endif // QOPCUARELATIVEPATHELEMENT_H | 
| 62 | 
