QGrpcClientBase Class

QGrpcClientBaseクラスは、生成されたクライアント・インターフェースのベースとなります。詳細...

ヘッダ #include <QGrpcClientBase>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
以来:Qt 6.5
継承: QObject

パブリック関数

virtual ~QGrpcClientBase() override
bool attachChannel(std::shared_ptr<QAbstractGrpcChannel> channel)
(since 6.7) std::shared_ptr<QAbstractGrpcChannel> channel() const

シグナル

(since 6.7) void channelChanged()

詳細説明

QGrpcClientBaseクラスは、サービス定義の生成されたクライアント・インターフェースのための共通機能セットを提供します。 gRPC共通の機能セットを提供します。

このクラスのRPCメソッドを直接呼び出すべきではありません。

注意: 非onstメンバ関数にはスレッド・セーフが適用されます。これらの関数は、オブジェクトが作成されたのと同じthread から呼び出す必要があります。

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

[override virtual noexcept] QGrpcClientBase::~QGrpcClientBase()

QGrpcClientBase を破壊する。

bool QGrpcClientBase::attachChannel(std::shared_ptr<QAbstractGrpcChannel> channel)

gRPC 操作のトランスポートレイヤーとしてchannel をクライアントにアタッチする。チャネルのアタッチに成功した場合、true を返す。そうでない場合、false を返す。

そうでなければ を返す。 リクエストメッセージとレスポンスメッセージは、チャネルがサポートする 形式でシリアライズされる。

注意 :警告:Qt GRPC は、チャネルレベルでのスレッドセーフを保証しない。チャネル関連関数は、QGrpcClientBase と同じスレッドで呼び出す必要があります。

注意: プロパティのセッター関数channel

[since 6.7] std::shared_ptr<QAbstractGrpcChannel> QGrpcClientBase::channel() const

このクライアントに接続されているチャネルを返します。

注: プロパティ・チャネルのゲッター関数です。

この関数は Qt 6.7 で導入されました。

[signal, since 6.7] void QGrpcClientBase::channelChanged()

新しいチャネルがクライアントにアタッチされたことを示す。

注意: channel プロパティ用の通知シグナルです。

この関数は 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.