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 QOPCUACONTENTFILTERELEMENT_H |
5 | #define QOPCUACONTENTFILTERELEMENT_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 QOpcUaSimpleAttributeOperand; |
16 | class QOpcUaAttributeOperand; |
17 | class QOpcUaElementOperand; |
18 | class QOpcUaLiteralOperand; |
19 | |
20 | class QOpcUaContentFilterElementData; |
21 | class Q_OPCUA_EXPORT QOpcUaContentFilterElement |
22 | { |
23 | public: |
24 | QOpcUaContentFilterElement(); |
25 | QOpcUaContentFilterElement(const QOpcUaContentFilterElement &); |
26 | QOpcUaContentFilterElement &operator=(const QOpcUaContentFilterElement &); |
27 | bool operator==(const QOpcUaContentFilterElement &rhs) const; |
28 | operator QVariant() const; |
29 | ~QOpcUaContentFilterElement(); |
30 | |
31 | // Specified in OPC-UA part 4, Tables 115 and 116 |
32 | enum FilterOperator : quint32 { |
33 | Equals = 0, |
34 | IsNull = 1, |
35 | GreaterThan = 2, |
36 | LessThan = 3, |
37 | GreaterThanOrEqual = 4, |
38 | LessThanOrEqual = 5, |
39 | Like = 6, |
40 | Not = 7, |
41 | Between = 8, |
42 | InList = 9, |
43 | And = 10, |
44 | Or = 11, |
45 | Cast = 12, |
46 | InView = 13, |
47 | OfType = 14, |
48 | RelatedTo = 15, |
49 | BitwiseAnd = 16, |
50 | BitwiseOr = 17 |
51 | }; |
52 | |
53 | QOpcUaContentFilterElement &operator<<(FilterOperator op); |
54 | QOpcUaContentFilterElement &operator<<(const QOpcUaSimpleAttributeOperand &op); |
55 | QOpcUaContentFilterElement &operator<<(const QOpcUaAttributeOperand &op); |
56 | QOpcUaContentFilterElement &operator<<(const QOpcUaLiteralOperand &op); |
57 | QOpcUaContentFilterElement &operator<<(const QOpcUaElementOperand &op); |
58 | |
59 | |
60 | QOpcUaContentFilterElement::FilterOperator filterOperator() const; |
61 | void setFilterOperator(QOpcUaContentFilterElement::FilterOperator filterOperator); |
62 | |
63 | QList<QVariant> filterOperands() const; |
64 | QList<QVariant> &filterOperandsRef(); |
65 | void setFilterOperands(const QList<QVariant> &filterOperands); |
66 | |
67 | private: |
68 | QSharedDataPointer<QOpcUaContentFilterElementData> data; |
69 | }; |
70 | |
71 | QT_END_NAMESPACE |
72 | |
73 | Q_DECLARE_METATYPE(QOpcUaContentFilterElement) |
74 | |
75 | #endif // QOPCUACONTENTFILTERELEMENT_H |
76 | |