Qt 4.8
Public Functions | Private Functions | Properties | Friends | List of all members
QPacketAutoSend Class Reference

#include <qpacketprotocol_p.h>

Inheritance diagram for QPacketAutoSend:
QPacket QDataStream

Public Functions

virtual ~QPacketAutoSend ()
 
- Public Functions inherited from QPacket
void clear ()
 Clears data in the packet. More...
 
QByteArray data () const
 Returns raw packet data. More...
 
bool isEmpty () const
 Returns true if this packet is empty - that is, contains no data. More...
 
 QPacket ()
 Constructs an empty write-only packet. More...
 
 QPacket (const QPacket &)
 Creates a copy of other. More...
 
virtual ~QPacket ()
 Destroys the QPacket instance. More...
 
- Public Functions inherited from QDataStream
bool atEnd () const
 Returns true if the I/O device has reached the end position (end of the stream or file) or if there is no I/O device set; otherwise returns false. More...
 
ByteOrder byteOrder () const
 Returns the current byte order setting – either BigEndian or LittleEndian. More...
 
QIODevicedevice () const
 Returns the I/O device currently set, or 0 if no device is currently set. More...
 
FloatingPointPrecision floatingPointPrecision () const
 Returns the floating point precision of the data stream. More...
 
QDataStreamoperator<< (qint8 i)
 Writes a signed byte, i, to the stream and returns a reference to the stream. More...
 
QDataStreamoperator<< (quint8 i)
 Writes an unsigned byte, i, to the stream and returns a reference to the stream. More...
 
QDataStreamoperator<< (qint16 i)
 Writes a signed 16-bit integer, i, to the stream and returns a reference to the stream. More...
 
QDataStreamoperator<< (quint16 i)
 Writes an unsigned 16-bit integer, i, to the stream and returns a reference to the stream. More...
 
QDataStreamoperator<< (qint32 i)
 Writes a signed 32-bit integer, i, to the stream and returns a reference to the stream. More...
 
QDataStreamoperator<< (quint32 i)
 Writes an unsigned integer, i, to the stream as a 32-bit unsigned integer (quint32). More...
 
QDataStreamoperator<< (qint64 i)
 Writes a signed 64-bit integer, i, to the stream and returns a reference to the stream. More...
 
QDataStreamoperator<< (quint64 i)
 Writes an unsigned 64-bit integer, i, to the stream and returns a reference to the stream. More...
 
QDataStreamoperator<< (bool i)
 Writes a boolean value, i, to the stream. More...
 
QDataStreamoperator<< (float f)
 Writes a floating point number, f, to the stream using the standard IEEE 754 format. More...
 
QDataStreamoperator<< (double f)
 Writes a floating point number, f, to the stream using the standard IEEE 754 format. More...
 
QDataStreamoperator<< (const char *str)
 Writes the '\0'-terminated string s to the stream and returns a reference to the stream. More...
 
QDataStreamoperator>> (qint8 &i)
 Reads a signed byte from the stream into i, and returns a reference to the stream. More...
 
QDataStreamoperator>> (quint8 &i)
 Reads an unsigned byte from the stream into i, and returns a reference to the stream. More...
 
QDataStreamoperator>> (qint16 &i)
 Reads a signed 16-bit integer from the stream into i, and returns a reference to the stream. More...
 
QDataStreamoperator>> (quint16 &i)
 Reads an unsigned 16-bit integer from the stream into i, and returns a reference to the stream. More...
 
QDataStreamoperator>> (qint32 &i)
 Reads a signed 32-bit integer from the stream into i, and returns a reference to the stream. More...
 
QDataStreamoperator>> (quint32 &i)
 Reads an unsigned 32-bit integer from the stream into i, and returns a reference to the stream. More...
 
QDataStreamoperator>> (qint64 &i)
 Reads a signed 64-bit integer from the stream into i, and returns a reference to the stream. More...
 
QDataStreamoperator>> (quint64 &i)
 Reads an unsigned 64-bit integer from the stream, into i, and returns a reference to the stream. More...
 
QDataStreamoperator>> (bool &i)
 Reads a boolean value from the stream into i. More...
 
QDataStreamoperator>> (float &f)
 Reads a floating point number from the stream into f, using the standard IEEE 754 format. More...
 
QDataStreamoperator>> (double &f)
 Reads a floating point number from the stream into f, using the standard IEEE 754 format. More...
 
QDataStreamoperator>> (char *&str)
 Reads the '\0'-terminated string s from the stream and returns a reference to the stream. More...
 
 QDataStream ()
 Constructs a data stream that has no I/O device. More...
 
 QDataStream (QIODevice *)
 Constructs a data stream that uses the I/O device d. More...
 
 QDataStream (QByteArray *, QIODevice::OpenMode flags)
 Constructs a data stream that operates on a byte array, a. More...
 
 QDataStream (const QByteArray &)
 Constructs a read-only data stream that operates on byte array a. More...
 
QDataStreamreadBytes (char *&, uint &len)
 Reads the buffer s from the stream and returns a reference to the stream. More...
 
int readRawData (char *, int len)
 Reads at most len bytes from the stream into s and returns the number of bytes read. More...
 
void resetStatus ()
 Resets the status of the data stream. More...
 
void setByteOrder (ByteOrder)
 Sets the serialization byte order to bo. More...
 
void setDevice (QIODevice *)
 void QDataStream::setDevice(QIODevice *d) More...
 
void setFloatingPointPrecision (FloatingPointPrecision precision)
 Sets the floating point precision of the data stream to precision. More...
 
void setStatus (Status status)
 Sets the status of the data stream to the status given. More...
 
void setVersion (int)
 Sets the version number of the data serialization format to v. More...
 
int skipRawData (int len)
 Skips len bytes from the device. More...
 
Status status () const
 Returns the status of the data stream. More...
 
void unsetDevice ()
 Unsets the I/O device. More...
 
int version () const
 Returns the version number of the data serialization format. More...
 
QDataStreamwriteBytes (const char *, uint len)
 Writes the length specifier len and the buffer s to the stream and returns a reference to the stream. More...
 
int writeRawData (const char *, int len)
 Writes len bytes from s to the stream. More...
 
virtual ~QDataStream ()
 Destroys the data stream. More...
 

Private Functions

 QPacketAutoSend (QPacketProtocol *)
 

Properties

QPacketProtocolp
 

Friends

class QPacketProtocol
 

Additional Inherited Members

- Public Types inherited from QDataStream
enum  ByteOrder { BigEndian = QSysInfo::BigEndian, LittleEndian = QSysInfo::LittleEndian }
 The byte order used for reading/writing the data. More...
 
enum  FloatingPointPrecision { SinglePrecision, DoublePrecision }
 The precision of floating point numbers used for reading/writing the data. More...
 
enum  Status { Ok, ReadPastEnd, ReadCorruptData, WriteFailed }
 This enum describes the current status of the data stream. More...
 
enum  Version {
  Qt_1_0 = 1, Qt_2_0 = 2, Qt_2_1 = 3, Qt_3_0 = 4,
  Qt_3_1 = 5, Qt_3_3 = 6, Qt_4_0 = 7, Qt_4_1 = Qt_4_0,
  Qt_4_2 = 8, Qt_4_3 = 9, Qt_4_4 = 10, Qt_4_5 = 11,
  Qt_4_6 = 12, Qt_4_7 = Qt_4_6, Qt_4_8 = Qt_4_7
}
 This enum provides symbolic synonyms for the data serialization format version numbers. More...
 
- Protected Functions inherited from QPacket
 QPacket (const QByteArray &ba)
 
- Protected Variables inherited from QPacket
QByteArray b
 
QBufferbuf
 

Detailed Description

Warning
This function is not part of the public interface.
This function is not part of the public interface.

Definition at line 112 of file qpacketprotocol_p.h.

Constructors and Destructors

◆ ~QPacketAutoSend()

QPacketAutoSend::~QPacketAutoSend ( )
virtual

Definition at line 567 of file qpacketprotocol.cpp.

568 {
569  if(!b.isEmpty())
570  p->send(*this);
571 }
QPacketAutoSend send()
Returns a streamable object that is transmitted on destruction.
QByteArray b
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
Definition: qbytearray.h:421
QPacketProtocol * p

◆ QPacketAutoSend()

QPacketAutoSend::QPacketAutoSend ( QPacketProtocol _p)
private

Definition at line 562 of file qpacketprotocol.cpp.

563 : QPacket(), p(_p)
564 {
565 }
QPacket()
Constructs an empty write-only packet.
QPacketProtocol * p

Friends and Related Functions

◆ QPacketProtocol

friend class QPacketProtocol
friend

Definition at line 118 of file qpacketprotocol_p.h.

Properties

◆ p

QPacketProtocol* QPacketAutoSend::p
private

Definition at line 120 of file qpacketprotocol_p.h.

Referenced by ~QPacketAutoSend().


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