API reference - Class QDataStream

Notation used in Ruby API documentation

Description: Binding of QDataStream

Class hierarchy: QDataStream

Sub-classes: ByteOrder, FloatingPointPrecision, Status

Public constructors

new QDataStreamnewConstructor QDataStream::QDataStream()
new QDataStreamnew(QIODevice ptr arg1)Constructor QDataStream::QDataStream(QIODevice *)
new QDataStreamnew(string ptr arg1,
const QIODevice_QFlags_OpenModeFlag flags)
Constructor QDataStream::QDataStream(QByteArray *, QFlags<QIODevice::OpenModeFlag> flags)
new QDataStreamnew(string arg1)Constructor QDataStream::QDataStream(const QByteArray &)

Public methods

void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[const]boolatEndMethod bool QDataStream::atEnd()
[const]QDataStream_ByteOrderbyteOrderMethod QDataStream::ByteOrder QDataStream::byteOrder()
voidbyteOrder=(const QDataStream_ByteOrder arg1)Method void QDataStream::setByteOrder(QDataStream::ByteOrder)
[const]QIODevice ptrdeviceMethod QIODevice *QDataStream::device()
voiddevice=(QIODevice ptr arg1)Method void QDataStream::setDevice(QIODevice *)
[const]QDataStream_FloatingPointPrecisionfloatingPointPrecisionMethod QDataStream::FloatingPointPrecision QDataStream::floatingPointPrecision()
voidfloatingPointPrecision=(const QDataStream_FloatingPointPrecision precision)Method void QDataStream::setFloatingPointPrecision(QDataStream::FloatingPointPrecision precision)
QDataStream ptrput_b(bool arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_ba(string arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_d(double arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_f(float arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_i16(short arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_i32(int arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_i64(long long arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_i8(signed char arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_il(int[] arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_iv(int[] arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_qc(unsigned int arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_s(string arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_ui16(unsigned short arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_ui32(unsigned int arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_ui64(unsigned long long arg1)Unambiguous adaptation of the corresponding operator<<
QDataStream ptrput_ui8(unsigned char arg1)Unambiguous adaptation of the corresponding operator<<
boolread_bUnambiguous adaptation of the corresponding operator>>
stringread_baUnambiguous adaptation of the corresponding operator>>
doubleread_dUnambiguous adaptation of the corresponding operator>>
floatread_fUnambiguous adaptation of the corresponding operator>>
shortread_i16Unambiguous adaptation of the corresponding operator>>
intread_i32Unambiguous adaptation of the corresponding operator>>
long longread_i64Unambiguous adaptation of the corresponding operator>>
signed charread_i8Unambiguous adaptation of the corresponding operator>>
int[]read_ilUnambiguous adaptation of the corresponding operator>>
int[]read_ivUnambiguous adaptation of the corresponding operator>>
unsigned intread_qcUnambiguous adaptation of the corresponding operator>>
stringread_sUnambiguous adaptation of the corresponding operator>>
unsigned shortread_ui16Unambiguous adaptation of the corresponding operator>>
unsigned intread_ui32Unambiguous adaptation of the corresponding operator>>
unsigned long longread_ui64Unambiguous adaptation of the corresponding operator>>
unsigned charread_ui8Unambiguous adaptation of the corresponding operator>>
voidresetStatusMethod void QDataStream::resetStatus()
voidsetByteOrder(const QDataStream_ByteOrder arg1)Method void QDataStream::setByteOrder(QDataStream::ByteOrder)
voidsetDevice(QIODevice ptr arg1)Method void QDataStream::setDevice(QIODevice *)
voidsetFloatingPointPrecision(const QDataStream_FloatingPointPrecision precision)Method void QDataStream::setFloatingPointPrecision(QDataStream::FloatingPointPrecision precision)
voidsetStatus(const QDataStream_Status status)Method void QDataStream::setStatus(QDataStream::Status status)
voidsetVersion(int arg1)Method void QDataStream::setVersion(int)
intskipRawData(int len)Method int QDataStream::skipRawData(int len)
[const]QDataStream_StatusstatusMethod QDataStream::Status QDataStream::status()
voidstatus=(const QDataStream_Status status)Method void QDataStream::setStatus(QDataStream::Status status)
voidunsetDeviceMethod void QDataStream::unsetDevice()
[const]intversionMethod int QDataStream::version()
voidversion=(int arg1)Method void QDataStream::setVersion(int)
QDataStreamwriteBytes(string arg1,
unsigned int len)
Method QDataStream &QDataStream::writeBytes(const char *, unsigned int len)
intwriteRawData(string arg1,
int len)
Method int QDataStream::writeRawData(const char *, int len)

Public static methods and constants

[static,const]new QDataStream_ByteOrder ptrBigEndianEnum constant QDataStream::BigEndian
[static,const]new QDataStream_FloatingPointPrecision ptrDoublePrecisionEnum constant QDataStream::DoublePrecision
[static,const]new QDataStream_ByteOrder ptrLittleEndianEnum constant QDataStream::LittleEndian
[static,const]new QDataStream_Status ptrOkEnum constant QDataStream::Ok
[static,const]new QDataStream_Status ptrReadCorruptDataEnum constant QDataStream::ReadCorruptData
[static,const]new QDataStream_Status ptrReadPastEndEnum constant QDataStream::ReadPastEnd
[static,const]new QDataStream_FloatingPointPrecision ptrSinglePrecisionEnum constant QDataStream::SinglePrecision

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

[static,const] new QDataStream_ByteOrder ptr BigEndian

Description: Enum constant QDataStream::BigEndian

[static,const] new QDataStream_FloatingPointPrecision ptr DoublePrecision

Description: Enum constant QDataStream::DoublePrecision

[static,const] new QDataStream_ByteOrder ptr LittleEndian

Description: Enum constant QDataStream::LittleEndian

[static,const] new QDataStream_Status ptr Ok

Description: Enum constant QDataStream::Ok

[static,const] new QDataStream_Status ptr ReadCorruptData

Description: Enum constant QDataStream::ReadCorruptData

[static,const] new QDataStream_Status ptr ReadPastEnd

Description: Enum constant QDataStream::ReadPastEnd

[static,const] new QDataStream_FloatingPointPrecision ptr SinglePrecision

Description: Enum constant QDataStream::SinglePrecision

void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

[const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

[const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

[const] bool atEnd

Description: Method bool QDataStream::atEnd()

[const] QDataStream_ByteOrder byteOrder

Description: Method QDataStream::ByteOrder QDataStream::byteOrder()

Python specific notes:

The object exposes a readable attribute 'byteOrder'. This is the getter.

void byteOrder=(const QDataStream_ByteOrder arg1)

Description: Method void QDataStream::setByteOrder(QDataStream::ByteOrder)

Python specific notes:

The object exposes a writable attribute 'byteOrder'. This is the setter.

void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

[const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

[const] QIODevice ptr device

Description: Method QIODevice *QDataStream::device()

Python specific notes:

The object exposes a readable attribute 'device'. This is the getter.

void device=(QIODevice ptr arg1)

Description: Method void QDataStream::setDevice(QIODevice *)

Python specific notes:

The object exposes a writable attribute 'device'. This is the setter.

[const] QDataStream_FloatingPointPrecision floatingPointPrecision

Description: Method QDataStream::FloatingPointPrecision QDataStream::floatingPointPrecision()

Python specific notes:

The object exposes a readable attribute 'floatingPointPrecision'. This is the getter.

void floatingPointPrecision=(const QDataStream_FloatingPointPrecision precision)

Description: Method void QDataStream::setFloatingPointPrecision(QDataStream::FloatingPointPrecision precision)

Python specific notes:

The object exposes a writable attribute 'floatingPointPrecision'. This is the setter.

[const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

[static] new QDataStream new

Description: Constructor QDataStream::QDataStream()

This method creates an object of class QDataStream.

Python specific notes:

This method is the default initializer of the object

[static] new QDataStream new(QIODevice ptr arg1)

Description: Constructor QDataStream::QDataStream(QIODevice *)

This method creates an object of class QDataStream.

Python specific notes:

This method is the default initializer of the object

[static] new QDataStream new(string ptr arg1,const QIODevice_QFlags_OpenModeFlag flags)

Description: Constructor QDataStream::QDataStream(QByteArray *, QFlags<QIODevice::OpenModeFlag> flags)

This method creates an object of class QDataStream.

Python specific notes:

This method is the default initializer of the object

[static] new QDataStream new(string arg1)

Description: Constructor QDataStream::QDataStream(const QByteArray &)

This method creates an object of class QDataStream.

Python specific notes:

This method is the default initializer of the object

QDataStream ptr put_b(bool arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_ba(string arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_d(double arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_f(float arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_i16(short arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_i32(int arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_i64(long long arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_i8(signed char arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_il(int[] arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_iv(int[] arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_qc(unsigned int arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_s(string arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_ui16(unsigned short arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_ui32(unsigned int arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_ui64(unsigned long long arg1)

Description: Unambiguous adaptation of the corresponding operator<<

QDataStream ptr put_ui8(unsigned char arg1)

Description: Unambiguous adaptation of the corresponding operator<<

bool read_b

Description: Unambiguous adaptation of the corresponding operator>>

string read_ba

Description: Unambiguous adaptation of the corresponding operator>>

double read_d

Description: Unambiguous adaptation of the corresponding operator>>

float read_f

Description: Unambiguous adaptation of the corresponding operator>>

short read_i16

Description: Unambiguous adaptation of the corresponding operator>>

int read_i32

Description: Unambiguous adaptation of the corresponding operator>>

long long read_i64

Description: Unambiguous adaptation of the corresponding operator>>

signed char read_i8

Description: Unambiguous adaptation of the corresponding operator>>

int[] read_il

Description: Unambiguous adaptation of the corresponding operator>>

int[] read_iv

Description: Unambiguous adaptation of the corresponding operator>>

unsigned int read_qc

Description: Unambiguous adaptation of the corresponding operator>>

string read_s

Description: Unambiguous adaptation of the corresponding operator>>

unsigned short read_ui16

Description: Unambiguous adaptation of the corresponding operator>>

unsigned int read_ui32

Description: Unambiguous adaptation of the corresponding operator>>

unsigned long long read_ui64

Description: Unambiguous adaptation of the corresponding operator>>

unsigned char read_ui8

Description: Unambiguous adaptation of the corresponding operator>>

void resetStatus

Description: Method void QDataStream::resetStatus()

void setByteOrder(const QDataStream_ByteOrder arg1)

Description: Method void QDataStream::setByteOrder(QDataStream::ByteOrder)

Python specific notes:

The object exposes a writable attribute 'byteOrder'. This is the setter.

void setDevice(QIODevice ptr arg1)

Description: Method void QDataStream::setDevice(QIODevice *)

Python specific notes:

The object exposes a writable attribute 'device'. This is the setter.

void setFloatingPointPrecision(const QDataStream_FloatingPointPrecision precision)

Description: Method void QDataStream::setFloatingPointPrecision(QDataStream::FloatingPointPrecision precision)

Python specific notes:

The object exposes a writable attribute 'floatingPointPrecision'. This is the setter.

void setStatus(const QDataStream_Status status)

Description: Method void QDataStream::setStatus(QDataStream::Status status)

Python specific notes:

The object exposes a writable attribute 'status'. This is the setter.

void setVersion(int arg1)

Description: Method void QDataStream::setVersion(int)

Python specific notes:

The object exposes a writable attribute 'version'. This is the setter.

int skipRawData(int len)

Description: Method int QDataStream::skipRawData(int len)

[const] QDataStream_Status status

Description: Method QDataStream::Status QDataStream::status()

Python specific notes:

The object exposes a readable attribute 'status'. This is the getter.

void status=(const QDataStream_Status status)

Description: Method void QDataStream::setStatus(QDataStream::Status status)

Python specific notes:

The object exposes a writable attribute 'status'. This is the setter.

void unsetDevice

Description: Method void QDataStream::unsetDevice()

[const] int version

Description: Method int QDataStream::version()

Python specific notes:

The object exposes a readable attribute 'version'. This is the getter.

void version=(int arg1)

Description: Method void QDataStream::setVersion(int)

Python specific notes:

The object exposes a writable attribute 'version'. This is the setter.

QDataStream writeBytes(string arg1,unsigned int len)

Description: Method QDataStream &QDataStream::writeBytes(const char *, unsigned int len)

int writeRawData(string arg1,int len)

Description: Method int QDataStream::writeRawData(const char *, int len)