1// Copyright (C) 2018 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 QOPCUAREADITEM_H
5#define QOPCUAREADITEM_H
6
7#include <QtOpcUa/qopcuatype.h>
8#include <QtCore/qshareddata.h>
9
10QT_BEGIN_NAMESPACE
11
12class QOpcUaReadItemData;
13class Q_OPCUA_EXPORT QOpcUaReadItem
14{
15public:
16 QOpcUaReadItem();
17 QOpcUaReadItem(const QOpcUaReadItem &other);
18 QOpcUaReadItem(const QString &nodeId, QOpcUa::NodeAttribute attr = QOpcUa::NodeAttribute::Value,
19 const QString &indexRange = QString());
20 QOpcUaReadItem &operator=(const QOpcUaReadItem &rhs);
21 ~QOpcUaReadItem();
22
23 QString nodeId() const;
24 void setNodeId(const QString &nodeId);
25
26 QOpcUa::NodeAttribute attribute() const;
27 void setAttribute(QOpcUa::NodeAttribute attribute);
28
29 QString indexRange() const;
30 void setIndexRange(const QString &indexRange);
31
32private:
33 QSharedDataPointer<QOpcUaReadItemData> data;
34
35 friend Q_OPCUA_EXPORT bool operator==(const QOpcUaReadItem &lhs,
36 const QOpcUaReadItem &rhs) noexcept;
37 friend inline bool operator!=(const QOpcUaReadItem &lhs, const QOpcUaReadItem &rhs) noexcept
38 {
39 return !(lhs == rhs);
40 }
41};
42
43QT_END_NAMESPACE
44
45Q_DECLARE_METATYPE(QOpcUaReadItem)
46
47#endif // QOPCUAREADITEM_H
48

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