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

The QIODeviceSource class is a QDataSource that draws data from a QIODevice. Más...

#include <qasyncio.h>

Diagrama de herencias de QIODeviceSource
QDataSource QDataSource QAsyncIO QAsyncIO QAsyncIO QAsyncIO

Lista de todos los miembros.

Métodos públicos

 QIODeviceSource (QIODevice *, int bufsize=4096)
 ~QIODeviceSource ()
int readyToSend ()
void sendTo (QDataSink *sink, int n)
bool rewindable () const
void enableRewind (bool on)
void rewind ()
 QIODeviceSource (QIODevice *, int bufsize=4096)
 ~QIODeviceSource ()
int readyToSend ()
void sendTo (QDataSink *sink, int n)
bool rewindable () const
void enableRewind (bool on)
void rewind ()

Descripción detallada

The QIODeviceSource class is a QDataSource that draws data from a QIODevice.

This class encapsulates retrieving data from a QIODevice (such as a QFile).


Documentación del constructor y destructor

QIODeviceSource::QIODeviceSource ( QIODevice device,
int  buffer_size = 4096 
)

Constructs a QIODeviceSource from the QIODevice device. The QIODevice must be dynamically allocated, becomes owned by the QIODeviceSource, and will be deleted when the QIODeviceSource is destroyed. buffer_size determines the size of buffering to use between asynchronous operations. The higher the buffer_size, the more efficient, but the less interleaved the operation will be with other processing.

QIODeviceSource::~QIODeviceSource ( )

Destroys the QIODeviceSource, deleting the QIODevice from which it was constructed.

QIODeviceSource::QIODeviceSource ( QIODevice ,
int  bufsize = 4096 
)
QIODeviceSource::~QIODeviceSource ( )

Documentación de las funciones miembro

void QIODeviceSource::enableRewind ( bool  on) [virtual]

If on is set to TRUE then rewinding is enabled. No special action is taken. If on is set to FALSE then rewinding is disabled.

Reimplementado de QDataSource.

void QIODeviceSource::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 de QDataSource.

int QIODeviceSource::readyToSend ( ) [virtual]

Ready until end-of-file.

Implementa QDataSource.

int QIODeviceSource::readyToSend ( ) [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.

Implementa QDataSource.

void QIODeviceSource::rewind ( ) [virtual]

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

Reimplementado de QDataSource.

void QIODeviceSource::rewind ( ) [virtual]

Calls reset() on the QIODevice.

Reimplementado de QDataSource.

bool QIODeviceSource::rewindable ( ) const [virtual]

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

The default returns FALSE.

Reimplementado de QDataSource.

bool QIODeviceSource::rewindable ( ) const [virtual]

All QIODeviceSource's are rewindable.

Reimplementado de QDataSource.

void QIODeviceSource::sendTo ( QDataSink sink,
int  n 
) [virtual]

Reads a block of data and sends up to n bytes to the sink.

Implementa QDataSource.

void QIODeviceSource::sendTo ( QDataSink ,
int  count 
) [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.

Implementa QDataSource.


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'