本页内容

QOpcUaContentFilterElement Class

OPC UA 的 ContentFilterElement。更多内容...

标题: #include <QOpcUaContentFilterElement>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

公共类型

enum FilterOperator { Equals, IsNull, GreaterThan, LessThan, GreaterThanOrEqual, …, BitwiseOr }

公共函数

QOpcUaContentFilterElement()
QOpcUaContentFilterElement(const QOpcUaContentFilterElement &rhs)
QList<QVariant> filterOperands() const
QList<QVariant> &filterOperandsRef()
QOpcUaContentFilterElement::FilterOperator filterOperator() const
void setFilterOperands(const QList<QVariant> &filterOperands)
void setFilterOperator(QOpcUaContentFilterElement::FilterOperator filterOperator)
operator QVariant() const
QOpcUaContentFilterElement &operator<<(QOpcUaContentFilterElement::FilterOperator op)
QOpcUaContentFilterElement &operator<<(const QOpcUaAttributeOperand &op)
QOpcUaContentFilterElement &operator<<(const QOpcUaElementOperand &op)
QOpcUaContentFilterElement &operator<<(const QOpcUaLiteralOperand &op)
QOpcUaContentFilterElement &operator<<(const QOpcUaSimpleAttributeOperand &op)
QOpcUaContentFilterElement &operator=(const QOpcUaContentFilterElement &rhs)
(since 6.7) bool operator!=(const QOpcUaContentFilterElement &lhs, const QOpcUaContentFilterElement &rhs)
bool operator==(const QOpcUaContentFilterElement &lhs, const QOpcUaContentFilterElement &rhs)

详细说明

一个内容过滤器元素包含一个运算符和一组操作数。共有四种不同的运算符类型,它们包含字面量值、对节点属性的引用或对其他内容过滤器元素的引用。

一个或多个内容过滤器元素的组合构成一个内容过滤器,服务器会使用该内容过滤器根据内容过滤器元素定义的条件对数据进行过滤。例如,事件过滤器中的where 子句即是一个内容过滤器,用于决定是否针对某个事件生成通知。

成员类型文档

enum QOpcUaContentFilterElement::FilterOperator

FilterOperator 枚举了 OPC UA 1.05 第 4 部分 7.7.3 中为 ContentFilterElement 指定的所有可能运算符。

常量值
QOpcUaContentFilterElement::Equals0
QOpcUaContentFilterElement::IsNull1
QOpcUaContentFilterElement::GreaterThan2
QOpcUaContentFilterElement::LessThan3
QOpcUaContentFilterElement::GreaterThanOrEqual4
QOpcUaContentFilterElement::LessThanOrEqual5
QOpcUaContentFilterElement::Like6
QOpcUaContentFilterElement::Not7
QOpcUaContentFilterElement::Between8
QOpcUaContentFilterElement::InList9
QOpcUaContentFilterElement::And10
QOpcUaContentFilterElement::Or11
QOpcUaContentFilterElement::Cast12
QOpcUaContentFilterElement::InView13
QOpcUaContentFilterElement::OfType14
QOpcUaContentFilterElement::RelatedTo15
QOpcUaContentFilterElement::BitwiseAnd16
QOpcUaContentFilterElement::BitwiseOr17

成员函数文档

QOpcUaContentFilterElement::QOpcUaContentFilterElement()

默认情况下,会构建一个未设置任何参数的内容过滤器元素。

QOpcUaContentFilterElement::QOpcUaContentFilterElement(const QOpcUaContentFilterElement &rhs)

根据rhs 创建一个内容过滤器元素。

QList<QVariant> QOpcUaContentFilterElement::filterOperands() const

返回过滤器元素的操作数。

另请参阅 setFilterOperands()。

QList<QVariant> &QOpcUaContentFilterElement::filterOperandsRef()

返回对过滤操作数的引用。

另请参阅 filterOperands()。

QOpcUaContentFilterElement::FilterOperator QOpcUaContentFilterElement::filterOperator() const

返回过滤运算符。

另请参阅 setFilterOperator()。

void QOpcUaContentFilterElement::setFilterOperands(const QList<QVariant> &filterOperands)

将此内容过滤器元素的过滤操作数设置为filterOperands 。支持的类包括QOpcUaElementOperand 、QOpcUaLiteralOperand 、QOpcUaSimpleAttributeOperand 和QOpcUaAttributeOperand 。

另请参阅 filterOperands()。

void QOpcUaContentFilterElement::setFilterOperator(QOpcUaContentFilterElement::FilterOperator filterOperator)

将应用于过滤器操作数的运算符设置为filterOperator 。

另请参阅 filterOperator()。

QOpcUaContentFilterElement::operator QVariant() const

将此内容过滤器元素转换为QVariant 。

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(QOpcUaContentFilterElement::FilterOperator op)

在此内容过滤器元素中设置过滤运算符op 。如果将多个运算符流式传输到同一个内容过滤器元素中,则仅使用最后一个运算符,其余运算符均被丢弃。

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(const QOpcUaAttributeOperand &op)

将属性操作数op 添加到此内容过滤器元素的操作数列表中。

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(const QOpcUaElementOperand &op)

将元素操作数op 添加到此内容过滤器元素的操作数列表中。

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(const QOpcUaLiteralOperand &op)

将字面量操作数op 添加到此内容过滤器元素的操作数列表中。

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator<<(const QOpcUaSimpleAttributeOperand &op)

将简单属性操作数op 添加到此内容过滤器元素的操作数列表中。

QOpcUaContentFilterElement &QOpcUaContentFilterElement::operator=(const QOpcUaContentFilterElement &rhs)

将rhs 中的值设置到此内容过滤器元素中。

相关非成员

[noexcept, since 6.7] bool operator!=(const QOpcUaContentFilterElement &lhs, const QOpcUaContentFilterElement &rhs)

如果 `lhs ` 的值与 `rhs` 不一致,则返回 `true `。

该函数在 Qt 6.7 中引入。

[noexcept] bool operator==(const QOpcUaContentFilterElement &lhs, const QOpcUaContentFilterElement &rhs)

如果 `lhs ` 与 `rhs` 的值相同,则返回 `true `。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.