Qt 4.8
Public Functions | Public Variables | List of all members
QBufferPrivate Class Reference
Inheritance diagram for QBufferPrivate:
QIODevicePrivate QObjectPrivate QObjectData

Public Functions

void _q_emitSignals ()
 
virtual qint64 peek (char *data, qint64 maxSize)
 
virtual QByteArray peek (qint64 maxSize)
 
 QBufferPrivate ()
 
 ~QBufferPrivate ()
 
- Public Functions inherited from QIODevicePrivate
bool isSequential () const
 
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

QByteArraybuf
 
QByteArray defaultBuf
 
int ioIndex
 
int signalConnectionCount
 
bool signalsEmitted
 
qint64 writtenSinceLastEmit
 
- Public Variables inherited from QIODevicePrivate
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

- Public Types inherited from QIODevicePrivate
enum  AccessMode { Unset, Sequential, RandomAccess }
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
- 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

QBufferPrivate

Definition at line 48 of file qbuffer.cpp.

Constructors and Destructors

◆ QBufferPrivate()

QBufferPrivate::QBufferPrivate ( )
inline

Definition at line 53 of file qbuffer.cpp.

54  : buf(0)
55 #ifndef QT_NO_QOBJECT
57 #endif
58  { }
QByteArray * buf
Definition: qbuffer.cpp:61
int signalConnectionCount
Definition: qbuffer.cpp:73
qint64 writtenSinceLastEmit
Definition: qbuffer.cpp:72
bool signalsEmitted
Definition: qbuffer.cpp:74

◆ ~QBufferPrivate()

QBufferPrivate::~QBufferPrivate ( )
inline

Definition at line 59 of file qbuffer.cpp.

59 { }

Functions

◆ _q_emitSignals()

void QBufferPrivate::_q_emitSignals ( )

Definition at line 79 of file qbuffer.cpp.

80 {
81  Q_Q(QBuffer);
82  emit q->bytesWritten(writtenSinceLastEmit);
84  emit q->readyRead();
85  signalsEmitted = false;
86 }
The QBuffer class provides a QIODevice interface for a QByteArray.
Definition: qbuffer.h:57
#define Q_Q(Class)
Definition: qglobal.h:2483
#define emit
Definition: qobjectdefs.h:76
qint64 writtenSinceLastEmit
Definition: qbuffer.cpp:72
bool signalsEmitted
Definition: qbuffer.cpp:74

◆ peek() [1/2]

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

Reimplemented from QIODevicePrivate.

Definition at line 89 of file qbuffer.cpp.

90 {
91  qint64 readBytes = qMin(maxSize, static_cast<qint64>(buf->size()) - pos);
92  memcpy(data, buf->constData() + pos, readBytes);
93  return readBytes;
94 }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
static const char * data(const QByteArray &arr)
__int64 qint64
Definition: qglobal.h:942
QByteArray * buf
Definition: qbuffer.cpp:61
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
int size() const
Returns the number of bytes in this byte array.
Definition: qbytearray.h:402

◆ peek() [2/2]

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

Reimplemented from QIODevicePrivate.

Definition at line 96 of file qbuffer.cpp.

97 {
98  qint64 readBytes = qMin(maxSize, static_cast<qint64>(buf->size()) - pos);
99  if (pos == 0 && maxSize >= buf->size())
100  return *buf;
101  return QByteArray(buf->constData() + pos, readBytes);
102 }
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
__int64 qint64
Definition: qglobal.h:942
QByteArray * buf
Definition: qbuffer.cpp:61
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
int size() const
Returns the number of bytes in this byte array.
Definition: qbytearray.h:402

Properties

◆ buf

QByteArray* QBufferPrivate::buf

Definition at line 61 of file qbuffer.cpp.

Referenced by peek().

◆ defaultBuf

QByteArray QBufferPrivate::defaultBuf

Definition at line 62 of file qbuffer.cpp.

◆ ioIndex

int QBufferPrivate::ioIndex

Definition at line 63 of file qbuffer.cpp.

◆ signalConnectionCount

int QBufferPrivate::signalConnectionCount

Definition at line 73 of file qbuffer.cpp.

◆ signalsEmitted

bool QBufferPrivate::signalsEmitted

Definition at line 74 of file qbuffer.cpp.

Referenced by _q_emitSignals().

◆ writtenSinceLastEmit

qint64 QBufferPrivate::writtenSinceLastEmit

Definition at line 72 of file qbuffer.cpp.

Referenced by _q_emitSignals().


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