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 QOPCUAMULTIDIMENSIONALARRAY_H |
5 | #define QOPCUAMULTIDIMENSIONALARRAY_H |
6 | |
7 | #include <QtOpcUa/qopcuaglobal.h> |
8 | |
9 | #include <QtCore/qshareddata.h> |
10 | #include <QtCore/qvariant.h> |
11 | #include <QtCore/qlist.h> |
12 | |
13 | QT_BEGIN_NAMESPACE |
14 | |
15 | class QOpcUaMultiDimensionalArrayData; |
16 | class Q_OPCUA_EXPORT QOpcUaMultiDimensionalArray |
17 | { |
18 | public: |
19 | QOpcUaMultiDimensionalArray(); |
20 | QOpcUaMultiDimensionalArray(const QOpcUaMultiDimensionalArray &other); |
21 | QOpcUaMultiDimensionalArray &operator=(const QOpcUaMultiDimensionalArray &rhs); |
22 | QOpcUaMultiDimensionalArray(const QVariantList &valueArray, const QList<quint32> &arrayDimensions); |
23 | QOpcUaMultiDimensionalArray(const QList<quint32> &arrayDimensions); |
24 | ~QOpcUaMultiDimensionalArray(); |
25 | |
26 | QVariantList valueArray() const; |
27 | QVariantList &valueArrayRef(); |
28 | void setValueArray(const QVariantList &valueArray); |
29 | |
30 | int arrayIndex(const QList<quint32> &indices) const; |
31 | QVariant value(const QList<quint32> &indices) const; |
32 | bool setValue(const QList<quint32> &indices, const QVariant &value); |
33 | |
34 | bool isValid() const; |
35 | |
36 | QList<quint32> arrayDimensions() const; |
37 | void setArrayDimensions(const QList<quint32> &arrayDimensions); |
38 | |
39 | bool operator==(const QOpcUaMultiDimensionalArray &other) const; |
40 | |
41 | operator QVariant() const; |
42 | |
43 | private: |
44 | QSharedDataPointer<QOpcUaMultiDimensionalArrayData> data; |
45 | }; |
46 | |
47 | QT_END_NAMESPACE |
48 | |
49 | Q_DECLARE_METATYPE(QOpcUaMultiDimensionalArray) |
50 | |
51 | #endif // QOPCUAMULTIDIMENSIONALARRAY_H |
52 |