![]() |
ckb-next
beta-v0.2.8 at branch testing
ckb-next driver for corsair devices
|
A class to compress/decompress QIODevice. More...
#include <src/ckb/quazip/quaziodevice.h>
Inheritance diagram for QuaZIODevice:
Collaboration diagram for QuaZIODevice:Public Member Functions | |
| QuaZIODevice (QIODevice *io, QObject *parent=NULL) | |
| Constructor. More... | |
| ~QuaZIODevice () | |
| Destructor. More... | |
| virtual bool | flush () |
| Flushes data waiting to be written. More... | |
| virtual bool | open (QIODevice::OpenMode mode) |
| Opens the device. More... | |
| virtual void | close () |
| Closes this device, but not the underlying one. More... | |
| QIODevice * | getIoDevice () const |
| Returns the underlying device. More... | |
| virtual bool | isSequential () const |
| Returns true. More... | |
Protected Member Functions | |
| virtual qint64 | readData (char *data, qint64 maxSize) |
| Implementation of QIODevice::readData(). More... | |
| virtual qint64 | writeData (const char *data, qint64 maxSize) |
| Implementation of QIODevice::writeData(). More... | |
Private Attributes | |
| QuaZIODevicePrivate * | d |
This class can be used to compress any data written to QIODevice or decompress it back. Compressing data sent over a QTcpSocket is a good example.
Definition at line 41 of file quaziodevice.h.
Definition at line 123 of file quaziodevice.cpp.
| QuaZIODevice::~QuaZIODevice | ( | ) |
Definition at line 130 of file quaziodevice.cpp.
Here is the call graph for this function:
|
virtual |
The underlying QIODevice is not closed in case you want to write something else to it.
Definition at line 169 of file quaziodevice.cpp.
Referenced by ~QuaZIODevice().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Unfortunately, as QIODevice doesn't support flush() by itself, the only thing this method does is write the compressed data into the device using Z_SYNC_FLUSH mode. If you need the compressed data to actually be flushed from the buffer of the underlying QIODevice, you need to call its flush() method as well, providing it supports it (like QTcpSocket does). Example:
This may change in the future versions of QuaZIP by implementing an ugly hack: trying to cast the QIODevice using qobject_cast to known flush()-supporting subclasses, and calling flush if the resulting pointer is not zero.
Definition at line 281 of file quaziodevice.cpp.
References d, and QUAZIO_OUTBUFSIZE.
Referenced by close().
Here is the caller graph for this function:| QIODevice * QuaZIODevice::getIoDevice | ( | ) | const |
Definition at line 137 of file quaziodevice.cpp.
References d.
|
virtual |
Definition at line 317 of file quaziodevice.cpp.
|
virtual |
| mode | Neither QIODevice::ReadWrite nor QIODevice::Append are not supported. |
Definition at line 142 of file quaziodevice.cpp.
References d.
|
protectedvirtual |
|
protectedvirtual |
|
private |
Definition at line 96 of file quaziodevice.h.
Referenced by close(), flush(), getIoDevice(), open(), readData(), writeData(), and ~QuaZIODevice().