返回介绍

QDataPump Class

发布于 2019-10-04 14:59:19 字数 1432 浏览 1010 评论 0 收藏 0

The QDataPump class moves data from a QDataSource to a QDataSink during event processing. More...

#include <qasyncio.h>

Inherits QObject.

List of all member functions.

Public Members

  • QDataPump ( QDataSource*data_source, QDataSink*data_sink )

Detailed Description

This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

The QDataPump class moves data from a QDataSource to a QDataSink during event processing.

For a QDataSource to provide data to a QDataSink, a controller must exist to examine the QDataSource::readyToSend() and QDataSink::readyToReceive() methods and respond to the QASyncIO::activate() signal of the source and sink. One very useful way to do this is interleaved with other event processing. QDataPump provides this - create a pipe between a source and a sink, and data will be moved during subsequent event processing.

Note that each source can only provide data to one sink and each sink can only receive data from one source (although it is quite possible to write a multiplexing sink that is multiple sources).


Member Function Documentation

QDataPump::QDataPump ( QDataSource*data_source, QDataSink*data_sink )

Constructs a QDataPump to move data from a given data_source to a given data_sink.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文