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 QOPCUALITERALOPERAND_H
5#define QOPCUALITERALOPERAND_H
6
7#include <QtOpcUa/qopcuatype.h>
8
9#include <QtCore/qshareddata.h>
10
11QT_BEGIN_NAMESPACE
12
13// OPC UA 1.05 part 4, 7.7.4.3
14class QOpcUaLiteralOperandData;
15class Q_OPCUA_EXPORT QOpcUaLiteralOperand
16{
17public:
18 QOpcUaLiteralOperand();
19 QOpcUaLiteralOperand(const QOpcUaLiteralOperand &);
20 QOpcUaLiteralOperand(const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined);
21 QOpcUaLiteralOperand &operator=(const QOpcUaLiteralOperand &);
22 operator QVariant() const;
23 ~QOpcUaLiteralOperand();
24
25 QVariant value() const;
26 void setValue(const QVariant &value);
27
28 QOpcUa::Types type() const;
29 void setType(QOpcUa::Types type);
30
31private:
32 friend Q_OPCUA_EXPORT bool comparesEqual(const QOpcUaLiteralOperand &lhs,
33 const QOpcUaLiteralOperand &rhs) noexcept;
34 friend bool operator==(const QOpcUaLiteralOperand &lhs,
35 const QOpcUaLiteralOperand &rhs) noexcept
36 { return comparesEqual(lhs, rhs); }
37 friend bool operator!=(const QOpcUaLiteralOperand &lhs,
38 const QOpcUaLiteralOperand &rhs) noexcept
39 {
40 return !(lhs == rhs);
41 }
42
43 QSharedDataPointer<QOpcUaLiteralOperandData> data;
44};
45
46QT_END_NAMESPACE
47
48Q_DECLARE_METATYPE(QOpcUaLiteralOperand)
49
50#endif // QOPCUALITERALOPERAND_H
51

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

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