1// Copyright (C) 2023 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 QOPCUAENUMDEFINITION_H
5#define QOPCUAENUMDEFINITION_H
6
7#include <QtOpcUa/qopcuaglobal.h>
8
9#include <QtCore/qcontainerfwd.h>
10#include <QtCore/qshareddata.h>
11
12QT_BEGIN_NAMESPACE
13
14class QOpcUaEnumDefinitionData;
15class QOpcUaEnumField;
16
17QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QOpcUaEnumDefinitionData, Q_OPCUA_EXPORT)
18
19class QOpcUaEnumDefinition
20{
21public:
22 Q_OPCUA_EXPORT QOpcUaEnumDefinition();
23 Q_OPCUA_EXPORT QOpcUaEnumDefinition(const QOpcUaEnumDefinition &other);
24 void swap(QOpcUaEnumDefinition &other) noexcept
25 { data.swap(other&: other.data); }
26 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QOpcUaEnumDefinition)
27 QOpcUaEnumDefinition(QOpcUaEnumDefinition &&other) noexcept = default;
28 Q_OPCUA_EXPORT QOpcUaEnumDefinition &operator=(const QOpcUaEnumDefinition &rhs);
29 Q_OPCUA_EXPORT operator QVariant() const;
30 Q_OPCUA_EXPORT ~QOpcUaEnumDefinition();
31
32 Q_OPCUA_EXPORT QList<QOpcUaEnumField> fields() const;
33 Q_OPCUA_EXPORT void setFields(const QList<QOpcUaEnumField> &fields);
34
35private:
36 QExplicitlySharedDataPointer<QOpcUaEnumDefinitionData> data;
37
38 friend Q_OPCUA_EXPORT bool comparesEqual(const QOpcUaEnumDefinition &lhs,
39 const QOpcUaEnumDefinition &rhs) noexcept;
40 friend bool operator==(const QOpcUaEnumDefinition &lhs,
41 const QOpcUaEnumDefinition &rhs) noexcept
42 { return comparesEqual(lhs, rhs); }
43 friend inline bool operator!=(const QOpcUaEnumDefinition &lhs, const QOpcUaEnumDefinition &rhs) noexcept
44 {
45 return !(lhs == rhs);
46 }
47};
48
49Q_DECLARE_SHARED(QOpcUaEnumDefinition)
50
51QT_END_NAMESPACE
52
53#endif // QOPCUAENUMDEFINITION_H
54

Provided by KDAB

Privacy Policy
Learn to use CMake with our Intro Training
Find out more

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