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
QRingChunk Class Reference

#include <qringbuffer_p.h>

+ Collaboration diagram for QRingChunk:

Public Member Functions

 QRingChunk () noexcept=default
 
 QRingChunk (qsizetype alloc)
 
 QRingChunk (const QByteArray &qba) noexcept
 
 QRingChunk (QByteArray &&qba) noexcept
 
void swap (QRingChunk &other) noexcept
 
void allocate (qsizetype alloc)
 
bool isShared () const
 
Q_CORE_EXPORT void detach ()
 
QByteArray toByteArray () &&
 
qsizetype head () const
 
qsizetype size () const
 
qsizetype capacity () const
 
qsizetype available () const
 
const char * data () const
 
char * data ()
 
void advance (qsizetype offset)
 
void grow (qsizetype offset)
 
void assign (const QByteArray &qba)
 
void assign (QByteArray &&qba)
 
void reset ()
 
void clear ()
 

Detailed Description

Definition at line 28 of file qringbuffer_p.h.

Constructor & Destructor Documentation

◆ QRingChunk() [1/4]

QRingChunk::QRingChunk ( )
defaultnoexcept

◆ QRingChunk() [2/4]

QRingChunk::QRingChunk ( qsizetype alloc)
inlineexplicit

Definition at line 33 of file qringbuffer_p.h.

◆ QRingChunk() [3/4]

QRingChunk::QRingChunk ( const QByteArray & qba)
inlineexplicitnoexcept

Definition at line 37 of file qringbuffer_p.h.

◆ QRingChunk() [4/4]

QRingChunk::QRingChunk ( QByteArray && qba)
inlineexplicitnoexcept

Definition at line 41 of file qringbuffer_p.h.

Member Function Documentation

◆ advance()

void QRingChunk::advance ( qsizetype offset)
inline

Definition at line 91 of file qringbuffer_p.h.

References Q_ASSERT, and size().

Referenced by QRingBuffer::free().

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

◆ allocate()

void QRingChunk::allocate ( qsizetype alloc)

Definition at line 17 of file qringbuffer.cpp.

References isShared(), Q_ASSERT, QByteArray(), size(), QByteArray::size(), and Qt::Uninitialized.

+ Here is the call graph for this function:

◆ assign() [1/2]

void QRingChunk::assign ( const QByteArray & qba)
inline

Definition at line 105 of file qringbuffer_p.h.

◆ assign() [2/2]

void QRingChunk::assign ( QByteArray && qba)
inline

Definition at line 111 of file qringbuffer_p.h.

References QByteArray::size().

+ Here is the call graph for this function:

◆ available()

qsizetype QRingChunk::available ( ) const
inline

Definition at line 75 of file qringbuffer_p.h.

References QByteArray::size().

Referenced by QRingBuffer::reserve().

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

◆ capacity()

qsizetype QRingChunk::capacity ( ) const
inline

Definition at line 71 of file qringbuffer_p.h.

References QByteArray::size().

Referenced by QRingBuffer::chop(), QRingBuffer::free(), and grow().

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

◆ clear()

void QRingChunk::clear ( )
inline

Definition at line 121 of file qringbuffer_p.h.

◆ data() [1/2]

char * QRingChunk::data ( )
inline

Definition at line 83 of file qringbuffer_p.h.

References QByteArray::data(), detach(), and isShared().

+ Here is the call graph for this function:

◆ data() [2/2]

const char * QRingChunk::data ( ) const
inline

Definition at line 79 of file qringbuffer_p.h.

References QByteArray::constData().

+ Here is the call graph for this function:

◆ detach()

void QRingChunk::detach ( )

Definition at line 25 of file qringbuffer.cpp.

References isShared(), Q_ASSERT, QByteArray(), and size().

Referenced by data().

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

◆ grow()

void QRingChunk::grow ( qsizetype offset)
inline

Definition at line 98 of file qringbuffer_p.h.

References capacity(), head(), Q_ASSERT, and size().

Referenced by QRingBuffer::chop(), and QRingBuffer::reserveFront().

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

◆ head()

qsizetype QRingChunk::head ( ) const
inline

Definition at line 63 of file qringbuffer_p.h.

Referenced by grow(), and QRingBuffer::reserveFront().

+ Here is the caller graph for this function:

◆ isShared()

bool QRingChunk::isShared ( ) const
inline

Definition at line 55 of file qringbuffer_p.h.

References QByteArray::isDetached().

Referenced by allocate(), QRingBuffer::chop(), data(), detach(), QRingBuffer::free(), QRingBuffer::reserve(), and QRingBuffer::reserveFront().

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

◆ reset()

void QRingChunk::reset ( )
inline

Definition at line 117 of file qringbuffer_p.h.

Referenced by QRingBuffer::chop(), and QRingBuffer::free().

+ Here is the caller graph for this function:

◆ size()

qsizetype QRingChunk::size ( ) const
inline

Definition at line 67 of file qringbuffer_p.h.

Referenced by advance(), allocate(), detach(), grow(), and QRingBuffer::reserve().

+ Here is the caller graph for this function:

◆ swap()

void QRingChunk::swap ( QRingChunk & other)
inlinenoexcept

Definition at line 46 of file qringbuffer_p.h.

References other(), qSwap(), and QByteArray::swap().

+ Here is the call graph for this function:

◆ toByteArray()

QByteArray QRingChunk::toByteArray ( ) &&

Definition at line 35 of file qringbuffer.cpp.

References head(), QByteArray::resize(), and QByteArray::sliced().

+ Here is the call graph for this function:

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