Qt 4.8
Public Types | Public Functions | Public Variables | List of all members
QIODevicePrivate Class Reference

#include <qiodevice_p.h>

Inheritance diagram for QIODevicePrivate:
QObjectPrivate QObjectData QAbstractSocketPrivate QBufferPrivate QFilePrivate QLocalSocketPrivate QNetworkReplyPrivate QProcessPrivate QTcpSocketPrivate QUdpSocketPrivate QTemporaryFilePrivate QNetworkReplyDataImplPrivate QNetworkReplyFileImplPrivate QNetworkReplyImplPrivate QSslSocketPrivate QSslSocketBackendPrivate

Public Types

enum  AccessMode { Unset, Sequential, RandomAccess }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 

Public Functions

bool isSequential () const
 
virtual qint64 peek (char *data, qint64 maxSize)
 
virtual QByteArray peek (qint64 maxSize)
 
virtual bool putCharHelper (char c)
 
 QIODevicePrivate ()
 
virtual ~QIODevicePrivate ()
 
- Public Functions inherited from QObjectPrivate
void _q_reregisterTimers (void *pointer)
 
void addConnection (int signal, Connection *c)
 
void cleanConnectionLists ()
 
void connectNotify (const char *signal)
 
void deleteChildren ()
 
void disconnectNotify (const char *signal)
 
bool isSender (const QObject *receiver, const char *signal) const
 
bool isSignalConnected (uint signalIdx) const
 Returns true if the signal with index signal_index from object sender is connected. More...
 
void moveToThread_helper ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
QObjectList receiverList (const char *signal) const
 
QObjectList senderList () const
 
void setParent_helper (QObject *)
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData)
 
int signalIndex (const char *signalName) const
 Returns the signal index used in the internal connectionLists vector. More...
 
virtual ~QObjectPrivate ()
 
- Public Functions inherited from QObjectData
virtual ~QObjectData ()=0
 

Public Variables

AccessMode accessMode
 
bool baseReadLineDataCalled
 
QIODevicePrivateLinearBuffer buffer
 
qint64 devicePos
 
QString errorString
 
bool firstRead
 
QIODevice::OpenMode openMode
 
qint64pDevicePos
 
qint64 pos
 
qint64pPos
 
qint64 seqDumpPos
 
- Public Variables inherited from QObjectPrivate
union {
   QObject *   currentChildBeingDeleted
 
   QAbstractDeclarativeData *   declarativeData
 
}; 
 
quint32 connectedSignals [2]
 
QObjectConnectionListVectorconnectionLists
 
SendercurrentSender
 
QList< QPointer< QObject > > eventFilters
 
ExtraDataextraData
 
QString objectName
 
Connectionsenders
 
QAtomicPointer< QtSharedPointer::ExternalRefCountData > sharedRefcount
 
QThreadDatathreadData
 
void * unused
 
- Public Variables inherited from QObjectData
uint blockSig: 1
 
QObjectList children
 
uint hasGuards: 1
 
uint inEventHandler: 1
 
uint inThreadChangeEvent: 1
 
uint isWidget: 1
 
QMetaObjectmetaObject
 
uint ownObjectName: 1
 
QObjectparent
 
uint pendTimer: 1
 
int postedEvents
 
QObjectq_ptr
 
uint receiveChildEvents: 1
 
uint sendChildEvents: 1
 
uint unused: 22
 
uint wasDeleted: 1
 

Additional Inherited Members

- Static Public Functions inherited from QObjectPrivate
static void clearGuards (QObject *)
 
static QObjectPrivateget (QObject *o)
 
static void resetCurrentSender (QObject *receiver, Sender *currentSender, Sender *previousSender)
 
static SendersetCurrentSender (QObject *receiver, Sender *sender)
 
static void signalSignature (const QMetaMethod &signal, QVarLengthArray< char > *result)
 

Detailed Description

Definition at line 201 of file qiodevice_p.h.

Enumerations

◆ AccessMode

Enumerator
Unset 
Sequential 
RandomAccess 

Definition at line 227 of file qiodevice_p.h.

Constructors and Destructors

◆ QIODevicePrivate()

QIODevicePrivate::QIODevicePrivate ( )
Warning
This function is not part of the public interface.

Definition at line 119 of file qiodevice.cpp.

Referenced by QLocalSocketPrivate::setErrorString().

121  pos(0), devicePos(0), seqDumpPos(0)
123  , baseReadLineDataCalled(false)
124  , firstRead(true)
125  , accessMode(Unset)
126 #ifdef QT_NO_QOBJECT
127  , q_ptr(0)
128 #endif
129 {
130 }
qint64 * pDevicePos
Definition: qiodevice_p.h:221
QIODevice::OpenMode openMode
Definition: qiodevice_p.h:212
QObject * q_ptr
Definition: qobject.h:91
QIODevicePrivateLinearBuffer buffer
Definition: qiodevice_p.h:215
#define QIODEVICE_BUFFERSIZE
Definition: qiodevice_p.h:68
AccessMode accessMode
Definition: qiodevice_p.h:232
bool baseReadLineDataCalled
Definition: qiodevice_p.h:222

◆ ~QIODevicePrivate()

QIODevicePrivate::~QIODevicePrivate ( )
virtual
Warning
This function is not part of the public interface.

Definition at line 134 of file qiodevice.cpp.

135 {
136 }

Functions

◆ isSequential()

bool QIODevicePrivate::isSequential ( ) const
inline

Definition at line 233 of file qiodevice_p.h.

234  {
235  if (accessMode == Unset)
236  accessMode = q_func()->isSequential() ? Sequential : RandomAccess;
237  return accessMode == Sequential;
238  }
AccessMode accessMode
Definition: qiodevice_p.h:232

◆ peek() [1/2]

qint64 QIODevicePrivate::peek ( char *  data,
qint64  maxSize 
)
virtual
Warning
This function is not part of the public interface.

Reimplemented in QSslSocketPrivate, and QBufferPrivate.

Definition at line 1502 of file qiodevice.cpp.

Referenced by QSslSocketPrivate::peek().

1503 {
1504  qint64 readBytes = q_func()->read(data, maxSize);
1505  if (readBytes <= 0)
1506  return readBytes;
1507 
1508  buffer.ungetBlock(data, readBytes);
1509  *pPos -= readBytes;
1510  return readBytes;
1511 }
QIODevicePrivateLinearBuffer buffer
Definition: qiodevice_p.h:215
static const char * data(const QByteArray &arr)
__int64 qint64
Definition: qglobal.h:942
void ungetBlock(const char *block, int size)
Definition: qiodevice_p.h:159

◆ peek() [2/2]

QByteArray QIODevicePrivate::peek ( qint64  maxSize)
virtual
Warning
This function is not part of the public interface.

Reimplemented in QSslSocketPrivate, and QBufferPrivate.

Definition at line 1516 of file qiodevice.cpp.

1517 {
1518  QByteArray result = q_func()->read(maxSize);
1519 
1520  if (result.isEmpty())
1521  return result;
1522 
1523  buffer.ungetBlock(result.constData(), result.size());
1524  *pPos -= result.size();
1525  return result;
1526 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
QIODevicePrivateLinearBuffer buffer
Definition: qiodevice_p.h:215
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
void ungetBlock(const char *block, int size)
Definition: qiodevice_p.h:159
int size() const
Returns the number of bytes in this byte array.
Definition: qbytearray.h:402
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
Definition: qbytearray.h:421

◆ putCharHelper()

bool QIODevicePrivate::putCharHelper ( char  c)
virtual
Warning
This function is not part of the public interface.

Reimplemented in QFilePrivate.

Definition at line 1494 of file qiodevice.cpp.

Referenced by QFilePrivate::putCharHelper().

1495 {
1496  return q_func()->write(&c, 1) == 1;
1497 }
unsigned char c[8]
Definition: qnumeric_p.h:62

Properties

◆ accessMode

AccessMode QIODevicePrivate::accessMode
mutable

Definition at line 232 of file qiodevice_p.h.

◆ baseReadLineDataCalled

bool QIODevicePrivate::baseReadLineDataCalled

Definition at line 222 of file qiodevice_p.h.

◆ buffer

QIODevicePrivateLinearBuffer QIODevicePrivate::buffer

Definition at line 215 of file qiodevice_p.h.

Referenced by QSslSocketPrivate::peek().

◆ devicePos

qint64 QIODevicePrivate::devicePos

Definition at line 217 of file qiodevice_p.h.

◆ errorString

QString QIODevicePrivate::errorString

◆ firstRead

bool QIODevicePrivate::firstRead

Definition at line 223 of file qiodevice_p.h.

◆ openMode

QIODevice::OpenMode QIODevicePrivate::openMode

◆ pDevicePos

qint64* QIODevicePrivate::pDevicePos

Definition at line 221 of file qiodevice_p.h.

◆ pos

qint64 QIODevicePrivate::pos

Definition at line 216 of file qiodevice_p.h.

Referenced by QBufferPrivate::peek(), and qt_create_commandline().

◆ pPos

qint64* QIODevicePrivate::pPos

Definition at line 220 of file qiodevice_p.h.

◆ seqDumpPos

qint64 QIODevicePrivate::seqDumpPos

Definition at line 219 of file qiodevice_p.h.


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