QMqttTopicName Class
QMqttTopicName クラスは、MQTT トピック名を表します。詳細...
| ヘッダー: | #include <QMqttTopicName> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Mqtt) target_link_libraries(mytarget PRIVATE Qt6::Mqtt) |
| qmake: | QT += mqtt |
- 継承されたメンバを含むすべてのメンバの一覧
- QMqttTopicName は「暗黙的に共有されるクラス」の一部です。
注:このクラスのすべての関数は再入可能です。
パブリック関数
| 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 は、QString をラップした薄いラッパーであり、MQTT トピック名のための表現力豊かなデータ型を提供します。意図しない誤用を防ぐ強力な型付けという利点に加え、QMqttTopicName は、isValid() やlevels() など、トピック名に関連する便利な関数も提供しています。
QMqttTopicFilterも参照してください 。
メンバ関数のドキュメント
QMqttTopicName::QMqttTopicName(const QLatin1String &name)
指定されたname を使用して、新しいMQTTトピック名を作成します。
QMqttTopicName::QMqttTopicName(const QString &name = QString())
指定されたname を使用して、新しいMQTTトピック名を作成します。
QMqttTopicName::QMqttTopicName(const QMqttTopicName &name)
name のコピーとして、新しい MQTT トピック名を作成します。
[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)
トピック名「lhs 」と「rhs 」が異なる場合は `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)
トピック名「lhs 」と「rhs 」が等しい場合は `true ` を返し、そうでない場合は `false` を返します。
QDataStream &operator>>(QDataStream &in, QMqttTopicName &name)
ストリーム `in ` からトピック名を `name ` に読み込み、そのストリームへの参照を返します。
「QDataStream 演算子の形式」も参照してください 。
© 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.