QMqttTopicName Class

QMqttTopicName クラスは MQTT トピック名を表します。詳細...

ヘッダー #include <QMqttTopicName>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt

注意:このクラスの関数はすべてリエントラントです。

パブリック関数

QMqttTopicName(const QLatin1String &name)
QMqttTopicName(const QString &name = QString())
QMqttTopicName(const QMqttTopicName &name)
~QMqttTopicName()
bool isValid() const
int levelCount() const
QStringList levels() const
QString name() const
void setName(const QString &name)
void swap(QMqttTopicName &other)
QMqttTopicName &operator=(const QMqttTopicName &name)
bool operator!=(const QMqttTopicName &lhs, const QMqttTopicName &rhs)
bool operator<(const QMqttTopicName &lhs, const QMqttTopicName &rhs)
QDataStream &operator<<(QDataStream &out, const QMqttTopicName &name)
bool operator==(const QMqttTopicName &lhs, const QMqttTopicName &rhs)
QDataStream &operator>>(QDataStream &in, QMqttTopicName &name)

詳細説明

QMqttTopicNameは、MQTTトピック名の表現力豊かなデータ型を提供するQString 。強力な型を持つことで意図しない誤用を防ぐことができるという利点の他に、QMqttTopicName はisValid() やlevels() のようなトピック名に関連する便利な関数を提供します。

QMqttTopicFilterも参照してください

メンバ関数のドキュメント

QMqttTopicName::QMqttTopicName(const QLatin1String &name)

指定したname で新しい MQTT トピック名を作成する。

QMqttTopicName::QMqttTopicName(const QString &name = QString())

指定したname で新しい MQTT トピック名を作成する。

QMqttTopicName::QMqttTopicName(const QMqttTopicName &name)

新しい MQTT トピック名をname のコピーとして作成する。

[noexcept] QMqttTopicName::~QMqttTopicName()

QMqttTopicName オブジェクトを破棄する。

bool QMqttTopicName::isValid() const

トピック名がMQTT標準4.7項に従って有効な場合はtrue 、そうでない場合はfalse

int QMqttTopicName::levelCount() const

トピック・レベルの総数を返します。

QStringList QMqttTopicName::levels() const

トピックレベルを返します。

QString QMqttTopicName::name() const

トピック名を返します。

setName()も参照

void QMqttTopicName::setName(const QString &name)

トピック名をname に設定する。

name()も参照のこと

[noexcept] void QMqttTopicName::swap(QMqttTopicName &other)

MQTT トピック名other をこの MQTT トピック名と交換する。この操作は非常に高速で、失敗することはない。

QMqttTopicName &QMqttTopicName::operator=(const QMqttTopicName &name)

このオブジェクトに MQTT トピック名name を割り当て、そのコピーへの参照を返します。

関連する非会員

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

トピック名lhsrhs が異なる場合はtrue を返し、そうでない場合はfalse を返す。

[noexcept] bool operator<(const QMqttTopicName &lhs, const QMqttTopicName &rhs)

トピック名lhs がトピック名rhs より語彙的に小さい場合はtrue を返し、そうでない場合はfalse を返す。

QDataStream &operator<<(QDataStream &out, const QMqttTopicName &name)

トピック名name をストリームout に書き込み、ストリームへの参照を返します。

QDataStream 演算子の形式も参照してください

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

トピック名lhsrhs が等しい場合はtrue を返し、そうでない場合はfalse を返す。

QDataStream &operator>>(QDataStream &in, QMqttTopicName &name)

トピック名をストリームin からname に読み取り、ストリームへの参照を返します。

QDataStream 演算子の形式も参照してください

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