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

#include <qiodevice_p.h>

+ Inheritance diagram for QIODevicePrivate:
+ Collaboration diagram for QIODevicePrivate:

Classes

class  QRingBufferRef
 

Public Types

enum  AccessMode : quint8 { Unset , Sequential , RandomAccess }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

 QIODevicePrivate ()
 
virtual ~QIODevicePrivate ()
 
virtual bool putCharHelper (char c)
 
bool isSequential () const
 
bool isBufferEmpty () const
 
bool allWriteBuffersEmpty () const
 
void seekBuffer (qint64 newPos)
 
void setCurrentReadChannel (int channel)
 
void setCurrentWriteChannel (int channel)
 
void setReadChannelCount (int count)
 
void setWriteChannelCount (int count)
 
qint64 read (char *data, qint64 maxSize, bool peeking=false)
 
qint64 readLine (char *data, qint64 maxSize)
 
virtual qint64 peek (char *data, qint64 maxSize)
 
virtual QByteArray peek (qint64 maxSize)
 
qint64 skipByReading (qint64 maxSize)
 
void write (const char *data, qint64 size)
 
bool isWriteChunkCached (const char *data, qint64 size) const
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Public Attributes

qint64 pos = 0
 
qint64 devicePos = 0
 
qint64 transactionPos = 0
 
QRingBufferRef buffer
 
QRingBufferRef writeBuffer
 
const QByteArraycurrentWriteChunk = nullptr
 
int readChannelCount = 0
 
int writeChannelCount = 0
 
int currentReadChannel = 0
 
int currentWriteChannel = 0
 
int readBufferChunkSize = QIODEVICE_BUFFERSIZE
 
int writeBufferChunkSize = 0
 
QVarLengthArray< QRingBuffer, 2 > readBuffers
 
QVarLengthArray< QRingBuffer, 1 > writeBuffers
 
QString errorString
 
QIODevice::OpenMode openMode = QIODevice::NotOpen
 
bool transactionStarted = false
 
bool baseReadLineDataCalled = false
 
AccessMode accessMode = Unset
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Detailed Description

Definition at line 36 of file qiodevice_p.h.

Member Enumeration Documentation

◆ AccessMode

Enumerator
Unset 
Sequential 
RandomAccess 

Definition at line 112 of file qiodevice_p.h.

Constructor & Destructor Documentation

◆ QIODevicePrivate()

QIODevicePrivate::QIODevicePrivate ( )

Definition at line 124 of file qiodevice.cpp.

◆ ~QIODevicePrivate()

QIODevicePrivate::~QIODevicePrivate ( )
virtual

Definition at line 131 of file qiodevice.cpp.

Member Function Documentation

◆ allWriteBuffersEmpty()

bool QIODevicePrivate::allWriteBuffersEmpty ( ) const

Definition at line 740 of file qiodevice.cpp.

References writeBuffers.

Referenced by QAbstractSocketPrivate::flush().

+ Here is the caller graph for this function:

◆ isBufferEmpty()

bool QIODevicePrivate::isBufferEmpty ( ) const
inline

Definition at line 125 of file qiodevice_p.h.

Referenced by read().

+ Here is the caller graph for this function:

◆ isSequential()

bool QIODevicePrivate::isSequential ( ) const
inline

Definition at line 118 of file qiodevice_p.h.

Referenced by QFileDevicePrivate::putCharHelper(), read(), and readLine().

+ Here is the caller graph for this function:

◆ isWriteChunkCached()

bool QIODevicePrivate::isWriteChunkCached ( const char * data,
qint64 size ) const
inline

Definition at line 154 of file qiodevice_p.h.

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

Referenced by write().

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

◆ peek() [1/2]

qint64 QIODevicePrivate::peek ( char * data,
qint64 maxSize )
virtual

Reimplemented in QBufferPrivate, and QSslSocketPrivate.

Definition at line 1824 of file qiodevice.cpp.

References read().

Referenced by QSslSocketPrivate::peek(), and QSslSocketPrivate::peek().

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

◆ peek() [2/2]

QByteArray QIODevicePrivate::peek ( qint64 maxSize)
virtual

Reimplemented in QBufferPrivate, and QSslSocketPrivate.

Definition at line 1832 of file qiodevice.cpp.

References read(), and Qt::Uninitialized.

+ Here is the call graph for this function:

◆ putCharHelper()

bool QIODevicePrivate::putCharHelper ( char c)
virtual

Reimplemented in QFileDevicePrivate.

Definition at line 1816 of file qiodevice.cpp.

Referenced by QFileDevicePrivate::putCharHelper().

+ Here is the caller graph for this function:

◆ read()

qint64 QIODevicePrivate::read ( char * data,
qint64 maxSize,
bool peeking = false )

Definition at line 1036 of file qiodevice.cpp.

References ch, devicePos, forever, isBufferEmpty(), isSequential(), openMode, pos, Q_INT64_C, qMax(), readBufferChunkSize, readFromDevice(), seekBuffer(), QIODeviceBase::Text, transactionPos, transactionStarted, and QIODeviceBase::Unbuffered.

Referenced by QAbstractSocketPrivate::pauseSocketNotifiers(), peek(), peek(), and skipByReading().

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

◆ readLine()

qint64 QIODevicePrivate::readLine ( char * data,
qint64 maxSize )

Definition at line 1338 of file qiodevice.cpp.

References baseReadLineDataCalled, debugBinaryString(), devicePos, i, isSequential(), openMode, pos, Q_ASSERT, QIODeviceBase::Text, transactionPos, and transactionStarted.

+ Here is the call graph for this function:

◆ seekBuffer()

void QIODevicePrivate::seekBuffer ( qint64 newPos)

Definition at line 883 of file qiodevice.cpp.

References pos.

Referenced by read().

+ Here is the caller graph for this function:

◆ setCurrentReadChannel()

void QIODevicePrivate::setCurrentReadChannel ( int channel)
inline

Definition at line 134 of file qiodevice_p.h.

References channel.

Referenced by setReadChannelCount().

+ Here is the caller graph for this function:

◆ setCurrentWriteChannel()

void QIODevicePrivate::setCurrentWriteChannel ( int channel)
inline

Definition at line 139 of file qiodevice_p.h.

References channel.

Referenced by setWriteChannelCount().

+ Here is the caller graph for this function:

◆ setReadChannelCount()

void QIODevicePrivate::setReadChannelCount ( int count)

Definition at line 661 of file qiodevice.cpp.

References currentReadChannel, QVarLengthArray< T, Prealloc >::emplace_back(), QIODEVICE_BUFFERSIZE, readBufferChunkSize, readBuffers, readChannelCount, QVarLengthArray< T, Prealloc >::reserve(), QVarLengthArray< T, Prealloc >::resize(), setCurrentReadChannel(), and QVLABaseBase::size().

Referenced by QAbstractSocketPrivate::fetchConnectionParameters().

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

◆ setWriteChannelCount()

void QIODevicePrivate::setWriteChannelCount ( int count)

Definition at line 720 of file qiodevice.cpp.

References currentWriteChannel, QVarLengthArray< T, Prealloc >::emplace_back(), QVarLengthArray< T, Prealloc >::reserve(), QVarLengthArray< T, Prealloc >::resize(), setCurrentWriteChannel(), QVLABaseBase::size(), writeBufferChunkSize, writeBuffers, and writeChannelCount.

Referenced by QAbstractSocketPrivate::fetchConnectionParameters().

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

◆ skipByReading()

qint64 QIODevicePrivate::skipByReading ( qint64 maxSize)

Definition at line 2003 of file qiodevice.cpp.

References read().

+ Here is the call graph for this function:

◆ write()

void QIODevicePrivate::write ( const char * data,
qint64 size )

Definition at line 1760 of file qiodevice.cpp.

References currentWriteChunk, and isWriteChunkCached().

Referenced by QAbstractSocketPrivate::pauseSocketNotifiers().

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

Member Data Documentation

◆ accessMode

AccessMode QIODevicePrivate::accessMode = Unset
mutable

Definition at line 117 of file qiodevice_p.h.

◆ baseReadLineDataCalled

bool QIODevicePrivate::baseReadLineDataCalled = false

Definition at line 108 of file qiodevice_p.h.

Referenced by readLine().

◆ buffer

◆ currentReadChannel

int QIODevicePrivate::currentReadChannel = 0

◆ currentWriteChannel

int QIODevicePrivate::currentWriteChannel = 0

◆ currentWriteChunk

const QByteArray* QIODevicePrivate::currentWriteChunk = nullptr

Definition at line 94 of file qiodevice_p.h.

Referenced by write().

◆ devicePos

qint64 QIODevicePrivate::devicePos = 0

Definition at line 54 of file qiodevice_p.h.

Referenced by QFileDevicePrivate::putCharHelper(), read(), and readLine().

◆ errorString

◆ openMode

QIODevice::OpenMode QIODevicePrivate::openMode = QIODevice::NotOpen

◆ pos

◆ readBufferChunkSize

int QIODevicePrivate::readBufferChunkSize = QIODEVICE_BUFFERSIZE

Definition at line 99 of file qiodevice_p.h.

Referenced by read(), and setReadChannelCount().

◆ readBuffers

QVarLengthArray<QRingBuffer, 2> QIODevicePrivate::readBuffers

◆ readChannelCount

int QIODevicePrivate::readChannelCount = 0

◆ transactionPos

qint64 QIODevicePrivate::transactionPos = 0

Definition at line 55 of file qiodevice_p.h.

Referenced by QSslSocketPrivate::peek(), QSslSocketPrivate::peek(), read(), and readLine().

◆ transactionStarted

bool QIODevicePrivate::transactionStarted = false

Definition at line 107 of file qiodevice_p.h.

Referenced by read(), and readLine().

◆ writeBuffer

QRingBufferRef QIODevicePrivate::writeBuffer

Definition at line 93 of file qiodevice_p.h.

Referenced by QSslSocketPrivate::tlsWriteBuffer().

◆ writeBufferChunkSize

◆ writeBuffers

QVarLengthArray<QRingBuffer, 1> QIODevicePrivate::writeBuffers

◆ writeChannelCount

int QIODevicePrivate::writeChannelCount = 0

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