Logo Search packages:      
Sourcecode: kmess version File versions  Download package

Isf::Compress::DataSource Class Reference

#include <datasource.h>

List of all members.


Detailed Description

Class to handle a QBuffer at the bit level.

You can use this class in two ways: first, reading and writing bytes normally. Second, reading and writing individual bits.

Warning: Mixing up the usage modes is not very well tested!

Definition at line 47 of file datasource.h.


Public Member Functions

void append (const QByteArray &bytes)
void append (const QBitArray &bits)
void append (char byte)
bool atEnd (bool considerBits=false) const
void clear ()
const QByteArray & data () const
 DataSource (const QByteArray &data)
 DataSource ()
void flush ()
bool getBit (bool *ok=0)
quint8 getBitIndex ()
quint64 getBits (quint8 amount, bool *ok=0)
char getByte (bool *ok=0)
QByteArray getBytes (quint8 amount, bool *ok=0)
qint64 pos () const
void prepend (const QByteArray &bytes)
void prepend (char byte)
void reset ()
void seekRelative (int pos)
void setData (const QByteArray &data)
qint64 size () const
void skipToNextByte ()
void skipToPrevByte ()
 ~DataSource ()

Private Member Functions

bool moveByteToBitArray ()

Private Attributes

QBuffer buffer_
 Main data buffer.
quint8 currentBitIndex_
 Current bit within the bit array.
QBitArray currentByte_
 Current byte.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index