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

Provided by KDAB

Privacy Policy
Start learning QML with our Intro Training
Find out more

source code of qtopcua/src/opcua/client/qopcuasimpleattributeoperand.h