Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QByteDataBuffer Class Reference

#include <qbytedata_p.h>

+ Collaboration diagram for QByteDataBuffer:

Public Member Functions

void squeezeFirst ()
 
void append (const QByteDataBuffer &other)
 
void append (QByteDataBuffer &&other)
 
void append (const QByteArray &bd)
 
void append (QByteArray &&bd)
 
void prepend (const QByteArray &bd)
 
void prepend (QByteArray &&bd)
 
QByteArray read ()
 
QByteArray readAll ()
 
QByteArray read (qint64 amount)
 
qint64 read (char *dst, qint64 amount)
 
QByteArrayView readPointer () const
 
void advanceReadPointer (qint64 distance)
 
char getChar ()
 
void clear ()
 
qint64 byteAmount () const
 
qsizetype bufferCount () const
 
bool isEmpty () const
 
qint64 sizeNextBlock () const
 
QByteArrayoperator[] (qsizetype i)
 
bool canReadLine () const
 

Static Public Member Functions

static void popFront (QByteArray &ba, qint64 n)
 

Detailed Description

Definition at line 28 of file qbytedata_p.h.

Member Function Documentation

◆ advanceReadPointer()

void QByteDataBuffer::advanceReadPointer ( qint64 distance)
inline

Advances the read pointer by distance.

See also
readPointer

Definition at line 195 of file qbytedata_p.h.

References isEmpty().

+ Here is the call graph for this function:

◆ append() [1/4]

void QByteDataBuffer::append ( const QByteArray & bd)
inline

Definition at line 74 of file qbytedata_p.h.

References append(), and QByteArray().

+ Here is the call graph for this function:

◆ append() [2/4]

void QByteDataBuffer::append ( const QByteDataBuffer & other)
inline

Definition at line 48 of file qbytedata_p.h.

References bufferCount(), other(), and popFront().

Referenced by append(), QDecompressHelper::feed(), QDecompressHelper::feed(), QDecompressHelper::feed(), and QHttpNetworkReplyPrivate::readBodyFast().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ append() [3/4]

void QByteDataBuffer::append ( QByteArray && bd)
inline

Definition at line 79 of file qbytedata_p.h.

◆ append() [4/4]

void QByteDataBuffer::append ( QByteDataBuffer && other)
inline

Definition at line 60 of file qbytedata_p.h.

References bufferCount(), other(), and popFront().

+ Here is the call graph for this function:

◆ bufferCount()

qsizetype QByteDataBuffer::bufferCount ( ) const
inline

Definition at line 242 of file qbytedata_p.h.

Referenced by append(), append(), and QDecompressHelper::feed().

+ Here is the caller graph for this function:

◆ byteAmount()

qint64 QByteDataBuffer::byteAmount ( ) const
inline

Definition at line 236 of file qbytedata_p.h.

Referenced by isEmpty(), read(), read(), readAll(), and QDecompressHelper::setCountingBytesEnabled().

+ Here is the caller graph for this function:

◆ canReadLine()

bool QByteDataBuffer::canReadLine ( ) const
inline

Definition at line 268 of file qbytedata_p.h.

References i.

◆ clear()

void QByteDataBuffer::clear ( )
inline

Definition at line 228 of file qbytedata_p.h.

Referenced by QDecompressHelper::clear(), and QHttpNetworkReplyPrivate::eraseData().

+ Here is the caller graph for this function:

◆ getChar()

char QByteDataBuffer::getChar ( )
inline

Definition at line 219 of file qbytedata_p.h.

References isEmpty(), Q_ASSERT_X, and read().

+ Here is the call graph for this function:

◆ isEmpty()

bool QByteDataBuffer::isEmpty ( ) const
inline

Definition at line 247 of file qbytedata_p.h.

References byteAmount().

Referenced by advanceReadPointer(), getChar(), QDecompressHelper::hasData(), read(), QDecompressHelper::read(), and readPointer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator[]()

QByteArray & QByteDataBuffer::operator[] ( qsizetype i)
inline

Definition at line 260 of file qbytedata_p.h.

References i, and squeezeFirst().

+ Here is the call graph for this function:

◆ popFront()

static void QByteDataBuffer::popFront ( QByteArray & ba,
qint64 n )
inlinestatic

Definition at line 35 of file qbytedata_p.h.

References ba, QByteArray::constData(), QByteArray(), and QByteArray::size().

Referenced by append(), append(), and squeezeFirst().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepend() [1/2]

void QByteDataBuffer::prepend ( const QByteArray & bd)
inline

Definition at line 88 of file qbytedata_p.h.

References prepend(), and QByteArray().

Referenced by prepend().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepend() [2/2]

void QByteDataBuffer::prepend ( QByteArray && bd)
inline

Definition at line 93 of file qbytedata_p.h.

References squeezeFirst().

+ Here is the call graph for this function:

◆ read() [1/3]

QByteArray QByteDataBuffer::read ( )
inline

Definition at line 106 of file qbytedata_p.h.

References isEmpty(), Q_ASSERT, and squeezeFirst().

Referenced by getChar(), QDecompressHelper::read(), read(), and readAll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read() [2/3]

qint64 QByteDataBuffer::read ( char * dst,
qint64 amount )
inline

Definition at line 141 of file qbytedata_p.h.

References byteAmount(), QByteArray::first(), qMin(), and QByteArray::size().

+ Here is the call graph for this function:

◆ read() [3/3]

QByteArray QByteDataBuffer::read ( qint64 amount)
inline

Definition at line 123 of file qbytedata_p.h.

References byteAmount(), QByteArray::data(), qBadAlloc(), qMin(), read(), QByteArray::resize(), and QByteArray::size().

+ Here is the call graph for this function:

◆ readAll()

QByteArray QByteDataBuffer::readAll ( )
inline

Definition at line 116 of file qbytedata_p.h.

References byteAmount(), and read().

+ Here is the call graph for this function:

◆ readPointer()

QByteArrayView QByteDataBuffer::readPointer ( ) const
inline

Returns a view into the first QByteArray contained inside, ignoring any already read data. Call advanceReadPointer() to advance the view forward. When a QByteArray is exhausted the view returned by this function will view into another QByteArray if any. Returns a default constructed view if no data is available.

See also
advanceReadPointer

Definition at line 181 of file qbytedata_p.h.

References QByteArrayView::first(), and isEmpty().

+ Here is the call graph for this function:

◆ sizeNextBlock()

qint64 QByteDataBuffer::sizeNextBlock ( ) const
inline

Definition at line 252 of file qbytedata_p.h.

◆ squeezeFirst()

void QByteDataBuffer::squeezeFirst ( )
inline

Definition at line 40 of file qbytedata_p.h.

References popFront().

Referenced by operator[](), prepend(), and read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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