2024-08-25 04:08:24 +00:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <QDataStream>
|
|
|
|
#include <QIODevice>
|
2024-08-29 07:01:51 +00:00
|
|
|
#define WORKAROUND_INNER_CLASS_DEFINITION_QtPrivate__StreamStateSaver
|
2024-10-16 05:07:56 +00:00
|
|
|
#include <qdatastream.h>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "gen_qdatastream.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QDataStream* QDataStream_new() {
|
|
|
|
return new QDataStream();
|
|
|
|
}
|
|
|
|
|
|
|
|
QDataStream* QDataStream_new2(QIODevice* param1) {
|
|
|
|
return new QDataStream(param1);
|
|
|
|
}
|
|
|
|
|
2024-10-18 23:53:33 +00:00
|
|
|
QDataStream* QDataStream_new3(struct miqt_string param1) {
|
|
|
|
QByteArray param1_QByteArray(param1.data, param1.len);
|
|
|
|
return new QDataStream(param1_QByteArray);
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QIODevice* QDataStream_Device(const QDataStream* self) {
|
|
|
|
return self->device();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_SetDevice(QDataStream* self, QIODevice* device) {
|
|
|
|
self->setDevice(device);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_UnsetDevice(QDataStream* self) {
|
|
|
|
self->unsetDevice();
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QDataStream_AtEnd(const QDataStream* self) {
|
|
|
|
return self->atEnd();
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QDataStream_Status(const QDataStream* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDataStream::Status _ret = self->status();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QDataStream_SetStatus(QDataStream* self, int status) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setStatus(static_cast<QDataStream::Status>(status));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_ResetStatus(QDataStream* self) {
|
|
|
|
self->resetStatus();
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QDataStream_FloatingPointPrecision(const QDataStream* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDataStream::FloatingPointPrecision _ret = self->floatingPointPrecision();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QDataStream_SetFloatingPointPrecision(QDataStream* self, int precision) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setFloatingPointPrecision(static_cast<QDataStream::FloatingPointPrecision>(precision));
|
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
int QDataStream_ByteOrder(const QDataStream* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDataStream::ByteOrder _ret = self->byteOrder();
|
2024-09-18 00:12:02 +00:00
|
|
|
return static_cast<int>(_ret);
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-09-18 00:12:02 +00:00
|
|
|
void QDataStream_SetByteOrder(QDataStream* self, int byteOrder) {
|
2024-08-29 07:01:51 +00:00
|
|
|
self->setByteOrder(static_cast<QDataStream::ByteOrder>(byteOrder));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
int QDataStream_Version(const QDataStream* self) {
|
|
|
|
return self->version();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_SetVersion(QDataStream* self, int version) {
|
|
|
|
self->setVersion(static_cast<int>(version));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftRight(QDataStream* self, signed char* i) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator>>(static_cast<qint8&>(*i));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftRightWithQuint8(QDataStream* self, unsigned char* i) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator>>(static_cast<quint8&>(*i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftRightWithQint16(QDataStream* self, int16_t* i) {
|
|
|
|
self->operator>>(static_cast<qint16&>(*i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftRightWithQuint16(QDataStream* self, uint16_t* i) {
|
|
|
|
self->operator>>(static_cast<quint16&>(*i));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftRightWithQint32(QDataStream* self, int* i) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator>>(static_cast<qint32&>(*i));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftRightWithQuint32(QDataStream* self, unsigned int* i) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator>>(static_cast<quint32&>(*i));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftRightWithQint64(QDataStream* self, long long* i) {
|
|
|
|
self->operator>>(static_cast<qint64&>(*i));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftRightWithQuint64(QDataStream* self, unsigned long long* i) {
|
|
|
|
self->operator>>(static_cast<quint64&>(*i));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftRightWithBool(QDataStream* self, bool* i) {
|
|
|
|
self->operator>>(*i);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftRightWithFloat(QDataStream* self, float* f) {
|
|
|
|
self->operator>>(static_cast<float&>(*f));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftRightWithDouble(QDataStream* self, double* f) {
|
|
|
|
self->operator>>(static_cast<double&>(*f));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftRightWithStr(QDataStream* self, char* str) {
|
|
|
|
self->operator>>(str);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftLeft(QDataStream* self, signed char i) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator<<(static_cast<qint8>(i));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftLeftWithQuint8(QDataStream* self, unsigned char i) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator<<(static_cast<quint8>(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftLeftWithQint16(QDataStream* self, int16_t i) {
|
|
|
|
self->operator<<(static_cast<qint16>(i));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftLeftWithQuint16(QDataStream* self, uint16_t i) {
|
|
|
|
self->operator<<(static_cast<quint16>(i));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftLeftWithQint32(QDataStream* self, int i) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator<<(static_cast<qint32>(i));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftLeftWithQuint32(QDataStream* self, unsigned int i) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator<<(static_cast<quint32>(i));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftLeftWithQint64(QDataStream* self, long long i) {
|
|
|
|
self->operator<<(static_cast<qint64>(i));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftLeftWithQuint64(QDataStream* self, unsigned long long i) {
|
|
|
|
self->operator<<(static_cast<quint64>(i));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftLeftWithBool(QDataStream* self, bool i) {
|
|
|
|
self->operator<<(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftLeftWithFloat(QDataStream* self, float f) {
|
|
|
|
self->operator<<(static_cast<float>(f));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_OperatorShiftLeftWithDouble(QDataStream* self, double f) {
|
|
|
|
self->operator<<(static_cast<double>(f));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_OperatorShiftLeftWithStr(QDataStream* self, const char* str) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->operator<<(str);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QDataStream* QDataStream_ReadBytes(QDataStream* self, char* param1, unsigned int* lenVal) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QDataStream& _ret = self->readBytes(param1, static_cast<uint&>(*lenVal));
|
2024-08-29 07:01:51 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-29 07:01:51 +00:00
|
|
|
}
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
int QDataStream_ReadRawData(QDataStream* self, char* param1, int lenVal) {
|
|
|
|
return self->readRawData(param1, static_cast<int>(lenVal));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
void QDataStream_WriteBytes(QDataStream* self, const char* param1, unsigned int lenVal) {
|
2024-08-25 04:08:24 +00:00
|
|
|
self->writeBytes(param1, static_cast<uint>(lenVal));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
int QDataStream_WriteRawData(QDataStream* self, const char* param1, int lenVal) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return self->writeRawData(param1, static_cast<int>(lenVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
int QDataStream_SkipRawData(QDataStream* self, int lenVal) {
|
|
|
|
return self->skipRawData(static_cast<int>(lenVal));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_StartTransaction(QDataStream* self) {
|
|
|
|
self->startTransaction();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool QDataStream_CommitTransaction(QDataStream* self) {
|
|
|
|
return self->commitTransaction();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_RollbackTransaction(QDataStream* self) {
|
|
|
|
self->rollbackTransaction();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_AbortTransaction(QDataStream* self) {
|
|
|
|
self->abortTransaction();
|
|
|
|
}
|
|
|
|
|
|
|
|
void QDataStream_Delete(QDataStream* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QtPrivate__StreamStateSaver* QtPrivate__StreamStateSaver_new(QDataStream* s) {
|
|
|
|
return new QtPrivate::StreamStateSaver(s);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QtPrivate__StreamStateSaver_Delete(QtPrivate__StreamStateSaver* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|