Eneboo - Documentación para desarrolladores
Métodos públicos
Referencia de la Clase QDataSource

The QDataSource class is an asynchronous producer of data. Más...

#include <qasyncio.h>

Diagrama de herencias de QDataSource
QAsyncIO QAsyncIO QIODeviceSource QIODeviceSource

Lista de todos los miembros.

Métodos públicos

virtual int readyToSend ()=0
virtual void sendTo (QDataSink *, int count)=0
void maybeReady ()
virtual bool rewindable () const
virtual void enableRewind (bool)
virtual void rewind ()
virtual int readyToSend ()=0
virtual void sendTo (QDataSink *, int count)=0
void maybeReady ()
virtual bool rewindable () const
virtual void enableRewind (bool)
virtual void rewind ()

Descripción detallada

The QDataSource class is an asynchronous producer of data.

A data source is an object which provides data from some source in an asynchronous manner. This means that at some time not determined by the data source, blocks of data will be taken from it for processing. The data source is able to limit the maximum size of such blocks which it is currently able to provide.

Ver también:
QAsyncIO, QDataSink, QDataPump

Documentación de las funciones miembro

void QDataSource::enableRewind ( bool  ) [virtual]

If this function is called with on set to TRUE, and rewindable() is TRUE, then the data source must take measures to allow the rewind() function to subsequently operate as described. If rewindable() is FALSE, the function should call QDataSource::enableRewind(), which aborts with a qFatal() error.

For example, a network connection may choose to use a disk cache of input only if rewinding is enabled before the first buffer-full of data is discarded, returning FALSE in rewindable() if that first buffer is discarded.

Reimplementado en QIODeviceSource y QIODeviceSource.

virtual void QDataSource::enableRewind ( bool  ) [virtual]

Reimplementado en QIODeviceSource y QIODeviceSource.

void QDataSource::maybeReady ( )
void QDataSource::maybeReady ( )

This should be called whenever readyToSend() might have become non-zero. It is merely calls QAsyncIO::ready() if readyToSend() is non-zero.

int QDataSource::readyToSend ( ) [pure virtual]

The data source should return a value indicating how much data it is ready to provide. This may be 0. If the data source knows it will never be able to provide any more data (until after a rewind()), it may return -1.

Implementado en QIODeviceSource y QIODeviceSource.

virtual int QDataSource::readyToSend ( ) [pure virtual]

Implementado en QIODeviceSource y QIODeviceSource.

virtual void QDataSource::rewind ( ) [virtual]

Reimplementado en QIODeviceSource y QIODeviceSource.

void QDataSource::rewind ( ) [virtual]

This function rewinds the data source. This may only be called if enableRewind(TRUE) has been previously called.

Reimplementado en QIODeviceSource y QIODeviceSource.

bool QDataSource::rewindable ( ) const [virtual]

This function should return TRUE if the data source can be rewound.

The default returns FALSE.

Reimplementado en QIODeviceSource y QIODeviceSource.

virtual bool QDataSource::rewindable ( ) const [virtual]

Reimplementado en QIODeviceSource y QIODeviceSource.

virtual void QDataSource::sendTo ( QDataSink ,
int  count 
) [pure virtual]

Implementado en QIODeviceSource y QIODeviceSource.

void QDataSource::sendTo ( QDataSink ,
int  count 
) [pure virtual]

This function is called to extract data from the source, by sending it to the given data sink. The count will be no more than the amount indicated by the most recent call to readyToSend(). The source must use all the provided data, and the sink will be prepared to accept at least this much data.

Implementado en QIODeviceSource y QIODeviceSource.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'