QOpcUaLiteralOperand Class

OPC UA LiteralOperand 类型。更多

头文件: #include <QOpcUaLiteralOperand>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpcUa)
target_link_libraries(mytarget PRIVATE Qt6::OpcUa)
qmake: QT += opcua

公共函数

QOpcUaLiteralOperand()
QOpcUaLiteralOperand(const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined)
QOpcUaLiteralOperand(const QOpcUaLiteralOperand &rhs)
void setType(QOpcUa::Types type)
void setValue(const QVariant &value)
QOpcUa::Types type() const
QVariant value() const
QVariant operator QVariant() const
QOpcUaLiteralOperand &operator=(const QOpcUaLiteralOperand &rhs)
(since 6.7) bool operator!=(const QOpcUaLiteralOperand &lhs, const QOpcUaLiteralOperand &rhs)
(since 6.7) bool operator==(const QOpcUaLiteralOperand &lhs, const QOpcUaLiteralOperand &rhs)

详细说明

LiteralOperand 定义于 OPC UA 1.05 第 4 部分 7.7.4.3。它包含一个用作操作数的字面值。

成员函数文档

QOpcUaLiteralOperand::QOpcUaLiteralOperand()

默认情况下构造一个字面操作数,不设置参数。

QOpcUaLiteralOperand::QOpcUaLiteralOperand(const QVariant &value, QOpcUa::Types type = QOpcUa::Types::Undefined)

构造一个数值为value 、类型为type 的字面操作数。

QOpcUaLiteralOperand::QOpcUaLiteralOperand(const QOpcUaLiteralOperand &rhs)

rhs 中构造一个字面操作数。

void QOpcUaLiteralOperand::setType(QOpcUa::Types type)

将字面操作数的值类型设置为type

另请参阅 type() 。

void QOpcUaLiteralOperand::setValue(const QVariant &value)

将字面操作数的值设置为value

另请参阅 value() 。

QOpcUa::Types QOpcUaLiteralOperand::type() const

返回字面操作数的值的类型。

另请参阅 setType()。

QVariant QOpcUaLiteralOperand::value() const

返回字面操作数的值。

另请参阅 setValue()。

QVariant QOpcUaLiteralOperand::operator QVariant() const

将字面操作数转换为QVariant

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

设置rhs 中的值QOpcUaLiteralOperand

相关非会员

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

如果lhs 的值不同于rhs ,则返回true

此函数在 Qt 6.7 中引入。

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

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

此函数在 Qt 6.7 中引入。

© 2025 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.