- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions

# QDataStream Class Reference

Search for all occurrences

## Detailed Description

Definition at line 71 of file qdatastream.h.

`#include <qdatastream.h>`

List of all members.

## Public Types
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 }
enum | ByteOrder { BigEndian = QSysInfo::BigEndian, LittleEndian = QSysInfo::LittleEndian }
enum | Status { Ok, ReadPastEnd, ReadCorruptData }
enum | FloatingPointPrecision { SinglePrecision, DoublePrecision }
## Public Member Functions
| QDataStream ()
| QDataStream (QIODevice *)
| QDataStream (QByteArray *, QIODevice::OpenMode flags)
| QDataStream (const QByteArray &)
virtual | ~QDataStream ()
QIODevice * | device () const
void | setDevice (QIODevice *)
void | unsetDevice ()
bool | atEnd () const
Status | status () const
void | setStatus (Status status)
void | resetStatus ()
FloatingPointPrecision | floatingPointPrecision () const
void | setFloatingPointPrecision (FloatingPointPrecision precision)
ByteOrder | byteOrder () const
void | setByteOrder (ByteOrder)
int | version () const
void | setVersion (int)
QDataStream & | operator>> (qint8 &i)
QDataStream & | operator>> (quint8 &i)
QDataStream & | operator>> (qint16 &i)
QDataStream & | operator>> (quint16 &i)
QDataStream & | operator>> (qint32 &i)
QDataStream & | operator>> (quint32 &i)
QDataStream & | operator>> (qint64 &i)
QDataStream & | operator>> (quint64 &i)
QDataStream & | operator>> (bool &i)
QDataStream & | operator>> (float &f)
QDataStream & | operator>> (double &f)
QDataStream & | operator>> (char *&str)
QDataStream & | operator<< (qint8 i)
QDataStream & | operator<< (quint8 i)
QDataStream & | operator<< (qint16 i)
QDataStream & | operator<< (quint16 i)
QDataStream & | operator<< (qint32 i)
QDataStream & | operator<< (quint32 i)
QDataStream & | operator<< (qint64 i)
QDataStream & | operator<< (quint64 i)
QDataStream & | operator<< (bool i)
QDataStream & | operator<< (float f)
QDataStream & | operator<< (double f)
QDataStream & | operator<< (const char *str)
QDataStream & | readBytes (char *&, uint &len)
int | readRawData (char *, int len)
QDataStream & | writeBytes (const char *, uint len)
int | writeRawData (const char *, int len)
int | skipRawData (int len)

## Member Enumeration Documentation

enum Version

Search for all occurrences

Enumerator:

  Qt_1_0 | Search for all occurrences
  Qt_2_0 | Search for all occurrences
  Qt_2_1 | Search for all occurrences
  Qt_3_0 | Search for all occurrences
  Qt_3_1 | Search for all occurrences
  Qt_3_3 | Search for all occurrences
  Qt_4_0 | Search for all occurrences
  Qt_4_1 | Search for all occurrences
  Qt_4_2 | Search for all occurrences
  Qt_4_3 | Search for all occurrences
  Qt_4_4 | Search for all occurrences
  Qt_4_5 | Search for all occurrences
  Qt_4_6 | Search for all occurrences
  Qt_4_7 | Search for all occurrences

Definition at line 74 of file qdatastream.h.

                     {
            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
    #if QT_VERSION >= 0x040800
    #error Add the datastream version for this Qt version
            Qt_4_8 = Qt_4_7
    #endif
        };

enum ByteOrder

Search for all occurrences

Enumerator:

  BigEndian | Search for all occurrences
  LittleEndian | Search for all occurrences

Definition at line 95 of file qdatastream.h.

                       {
            BigEndian = QSysInfo::BigEndian,
            LittleEndian = QSysInfo::LittleEndian
        };

enum Status

Search for all occurrences

Enumerator:

  Ok | Search for all occurrences
  ReadPastEnd | Search for all occurrences
  ReadCorruptData | Search for all occurrences

Definition at line 100 of file qdatastream.h.

                    {
            Ok,
            ReadPastEnd,
        ReadCorruptData
        };

enum FloatingPointPrecision

Search for all occurrences

Enumerator:

  SinglePrecision | Search for all occurrences
  DoublePrecision | Search for all occurrences

Definition at line 106 of file qdatastream.h.

                                    {
            SinglePrecision,
            DoublePrecision
        };

## Constructor & Destructor Documentation

QDataStream | ( |  | ) |

QDataStream | ( | QIODevice * |  | ) | `[explicit]`

QDataStream | ( | QByteArray * | ,
|  | QIODevice::OpenMode | flags
| ) |  |

QDataStream | ( | const QByteArray & |  | ) |

virtual ~QDataStream | ( |  | ) | `[virtual]`

## Member Function Documentation

QIODevice * device | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 204 of file qdatastream.h.

    { return dev; }

void setDevice | ( | QIODevice * |  | ) |

Search for all occurrences

void unsetDevice | ( |  | ) |

Search for all occurrences

bool atEnd | ( |  | ) | const

Search for all occurrences

Status status | ( |  | ) | const

Search for all occurrences

void setStatus | ( | Status | status | ) |

Search for all occurrences

void resetStatus | ( |  | ) |

Search for all occurrences

FloatingPointPrecision floatingPointPrecision | ( |  | ) | const

Search for all occurrences

void setFloatingPointPrecision | ( | FloatingPointPrecision | precision | ) |

Search for all occurrences

QDataStream::ByteOrder byteOrder | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 207 of file qdatastream.h.

    { return byteorder; }

void setByteOrder | ( | ByteOrder |  | ) |

Search for all occurrences

int version | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 210 of file qdatastream.h.

    { return ver; }

void setVersion | ( | int | v | ) | `[inline]`

Search for all occurrences

Definition at line 213 of file qdatastream.h.

    { ver = v; }

QDataStream& operator>> | ( | qint8 & | i | ) |

QDataStream & operator>> | ( | quint8 & | i | ) | `[inline]`

Definition at line 216 of file qdatastream.h.

    { return *this >> reinterpret_cast<qint8&>(i); }

QDataStream& operator>> | ( | qint16 & | i | ) |

QDataStream & operator>> | ( | quint16 & | i | ) | `[inline]`

Definition at line 219 of file qdatastream.h.

    { return *this >> reinterpret_cast<qint16&>(i); }

QDataStream& operator>> | ( | qint32 & | i | ) |

QDataStream & operator>> | ( | quint32 & | i | ) | `[inline]`

Definition at line 222 of file qdatastream.h.

    { return *this >> reinterpret_cast<qint32&>(i); }

QDataStream& operator>> | ( | qint64 & | i | ) |

QDataStream & operator>> | ( | quint64 & | i | ) | `[inline]`

Definition at line 225 of file qdatastream.h.

    { return *this >> reinterpret_cast<qint64&>(i); }

QDataStream& operator>> | ( | bool & | i | ) |

QDataStream& operator>> | ( | float & | f | ) |

QDataStream& operator>> | ( | double & | f | ) |

QDataStream& operator>> | ( | char *& | str | ) |

QDataStream& operator<< | ( | qint8 | i | ) |

QDataStream & operator<< | ( | quint8 | i | ) | `[inline]`

Definition at line 228 of file qdatastream.h.

    { return *this << qint8(i); }

QDataStream& operator<< | ( | qint16 | i | ) |

QDataStream & operator<< | ( | quint16 | i | ) | `[inline]`

Definition at line 231 of file qdatastream.h.

    { return *this << qint16(i); }

QDataStream& operator<< | ( | qint32 | i | ) |

QDataStream & operator<< | ( | quint32 | i | ) | `[inline]`

Definition at line 234 of file qdatastream.h.

    { return *this << qint32(i); }

QDataStream& operator<< | ( | qint64 | i | ) |

QDataStream & operator<< | ( | quint64 | i | ) | `[inline]`

Definition at line 237 of file qdatastream.h.

    { return *this << qint64(i); }

QDataStream& operator<< | ( | bool | i | ) |

QDataStream& operator<< | ( | float | f | ) |

QDataStream& operator<< | ( | double | f | ) |

QDataStream& operator<< | ( | const char * | str | ) |

QDataStream& readBytes | ( | char *& | ,
|  | uint & | len
| ) |  |

Search for all occurrences

int readRawData | ( | char * | ,
|  | int | len
| ) |  |

Search for all occurrences

QDataStream& writeBytes | ( | const char * | ,
|  | uint | len
| ) |  |

Search for all occurrences

int writeRawData | ( | const char * | ,
|  | int | len
| ) |  |

Search for all occurrences

int skipRawData | ( | int | len | ) |

Search for all occurrences

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

- QtCore/qdatastream.h

QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream
QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream QDataStream