![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qringbuffer_p.h>
Public Member Functions | |
QRingBuffer (int growth=QRINGBUFFER_CHUNKSIZE) | |
QRingBuffer (QRingBuffer &&) noexcept=default | |
QRingBuffer & | operator= (QRingBuffer &&) noexcept=default |
void | setChunkSize (int size) |
int | chunkSize () const |
qint64 | nextDataBlockSize () const |
const char * | readPointer () const |
Q_CORE_EXPORT const char * | readPointerAtPosition (qint64 pos, qint64 &length) const |
Q_CORE_EXPORT void | free (qint64 bytes) |
Q_CORE_EXPORT char * | reserve (qint64 bytes) |
Q_CORE_EXPORT char * | reserveFront (qint64 bytes) |
void | truncate (qint64 pos) |
Q_CORE_EXPORT void | chop (qint64 bytes) |
bool | isEmpty () const |
int | getChar () |
void | putChar (char c) |
void | ungetChar (char c) |
qint64 | size () const |
Q_CORE_EXPORT void | clear () |
qint64 | indexOf (char c) const |
Q_CORE_EXPORT qint64 | indexOf (char c, qint64 maxLength, qint64 pos=0) const |
Q_CORE_EXPORT qint64 | read (char *data, qint64 maxLength) |
Q_CORE_EXPORT QByteArray | read () |
Q_CORE_EXPORT qint64 | peek (char *data, qint64 maxLength, qint64 pos=0) const |
Q_CORE_EXPORT void | append (const char *data, qint64 size) |
Q_CORE_EXPORT void | append (const QByteArray &qba) |
Q_CORE_EXPORT void | append (QByteArray &&qba) |
qint64 | skip (qint64 length) |
Q_CORE_EXPORT qint64 | readLineWithoutTerminatingNull (char *data, qint64 maxLength) |
Q_CORE_EXPORT qint64 | readLine (char *data, qint64 maxLength) |
bool | canReadLine () const |
Definition at line 133 of file qringbuffer_p.h.
|
inlineexplicit |
Definition at line 137 of file qringbuffer_p.h.
|
defaultnoexcept |
Append bytes from data to the end
Definition at line 300 of file qringbuffer.cpp.
void QRingBuffer::append | ( | const QByteArray & | qba | ) |
Append a new buffer to the end
Definition at line 319 of file qringbuffer.cpp.
void QRingBuffer::append | ( | QByteArray && | qba | ) |
Append a new buffer to the end
Definition at line 333 of file qringbuffer.cpp.
|
inline |
Definition at line 220 of file qringbuffer_p.h.
Definition at line 164 of file qringbuffer.cpp.
|
inline |
Definition at line 147 of file qringbuffer_p.h.
void QRingBuffer::clear | ( | ) |
Definition at line 197 of file qringbuffer.cpp.
Definition at line 73 of file qringbuffer.cpp.
|
inline |
Definition at line 176 of file qringbuffer_p.h.
References isEmpty(), and readPointer().
|
inline |
Definition at line 201 of file qringbuffer_p.h.
Definition at line 207 of file qringbuffer.cpp.
|
inline |
Definition at line 172 of file qringbuffer_p.h.
Referenced by getChar().
|
inline |
Definition at line 151 of file qringbuffer_p.h.
|
defaultnoexcept |
Peek the bytes from a specified position
Definition at line 272 of file qringbuffer.cpp.
|
inline |
Definition at line 184 of file qringbuffer_p.h.
QByteArray QRingBuffer::read | ( | ) |
Read an unspecified amount (will read the first buffer)
Definition at line 258 of file qringbuffer.cpp.
Definition at line 238 of file qringbuffer.cpp.
Definition at line 353 of file qringbuffer.cpp.
Definition at line 343 of file qringbuffer.cpp.
|
inline |
Definition at line 155 of file qringbuffer_p.h.
Referenced by getChar().
Access the bytes at a specified position the out-variable length will contain the amount of bytes readable from there, e.g. the amount still the same QByteArray
Definition at line 56 of file qringbuffer.cpp.
char * QRingBuffer::reserve | ( | qint64 | bytes | ) |
Definition at line 106 of file qringbuffer.cpp.
char * QRingBuffer::reserveFront | ( | qint64 | bytes | ) |
Allocate data at buffer head
Definition at line 136 of file qringbuffer.cpp.
|
inline |
Definition at line 143 of file qringbuffer_p.h.
|
inline |
Definition at line 196 of file qringbuffer_p.h.
Definition at line 210 of file qringbuffer_p.h.
Definition at line 164 of file qringbuffer_p.h.
|
inline |
Definition at line 189 of file qringbuffer_p.h.