miqt/qt6/gen_qstringconverter.cpp

115 lines
5.5 KiB
C++
Raw Normal View History

2024-10-20 05:21:03 +00:00
#include <QByteArrayView>
#include <QChar>
2024-11-19 06:29:06 +00:00
#include <QStringConverter>
#include <QStringConverterBase>
2024-10-20 05:21:03 +00:00
#include <QStringDecoder>
#include <QStringEncoder>
#include <qstringconverter.h>
#include "gen_qstringconverter.h"
#include "_cgo_export.h"
2024-11-19 06:29:06 +00:00
void QStringEncoder_new(QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringEncoder* ret = new QStringEncoder();
*outptr_QStringEncoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringEncoder_new2(int encoding, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringEncoder* ret = new QStringEncoder(static_cast<QStringConverter::Encoding>(encoding));
*outptr_QStringEncoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringEncoder_new3(const char* name, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringEncoder* ret = new QStringEncoder(name);
*outptr_QStringEncoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringEncoder_new4(int encoding, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringEncoder* ret = new QStringEncoder(static_cast<QStringConverter::Encoding>(encoding), static_cast<QStringConverterBase::Flags>(flags));
*outptr_QStringEncoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringEncoder_new5(const char* name, int flags, QStringEncoder** outptr_QStringEncoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringEncoder* ret = new QStringEncoder(name, static_cast<QStringConverterBase::Flags>(flags));
*outptr_QStringEncoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
ptrdiff_t QStringEncoder_RequiredSpace(const QStringEncoder* self, ptrdiff_t inputLength) {
qsizetype _ret = self->requiredSpace((qsizetype)(inputLength));
return static_cast<ptrdiff_t>(_ret);
}
2024-11-19 06:29:06 +00:00
void QStringEncoder_Delete(QStringEncoder* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QStringEncoder*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringDecoder_new(int encoding, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringDecoder* ret = new QStringDecoder(static_cast<QStringConverter::Encoding>(encoding));
*outptr_QStringDecoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringDecoder_new2(QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringDecoder* ret = new QStringDecoder();
*outptr_QStringDecoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringDecoder_new3(const char* name, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringDecoder* ret = new QStringDecoder(name);
*outptr_QStringDecoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringDecoder_new4(int encoding, int flags, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringDecoder* ret = new QStringDecoder(static_cast<QStringConverter::Encoding>(encoding), static_cast<QStringConverterBase::Flags>(flags));
*outptr_QStringDecoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
2024-11-19 06:29:06 +00:00
void QStringDecoder_new5(const char* name, int f, QStringDecoder** outptr_QStringDecoder, QStringConverter** outptr_QStringConverter, QStringConverterBase** outptr_QStringConverterBase) {
QStringDecoder* ret = new QStringDecoder(name, static_cast<QStringConverterBase::Flags>(f));
*outptr_QStringDecoder = ret;
*outptr_QStringConverter = static_cast<QStringConverter*>(ret);
*outptr_QStringConverterBase = static_cast<QStringConverterBase*>(ret);
2024-10-20 05:21:03 +00:00
}
ptrdiff_t QStringDecoder_RequiredSpace(const QStringDecoder* self, ptrdiff_t inputLength) {
qsizetype _ret = self->requiredSpace((qsizetype)(inputLength));
return static_cast<ptrdiff_t>(_ret);
}
QChar* QStringDecoder_AppendToBuffer(QStringDecoder* self, QChar* out, QByteArrayView* ba) {
return self->appendToBuffer(out, *ba);
}
QStringDecoder* QStringDecoder_DecoderForHtml(QByteArrayView* data) {
return new QStringDecoder(QStringDecoder::decoderForHtml(*data));
}
2024-11-19 06:29:06 +00:00
void QStringDecoder_Delete(QStringDecoder* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QStringDecoder*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}