miqt/qt6/gen_qstringconverter.cpp

97 lines
2.8 KiB
C++
Raw Permalink 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"
#ifndef _Bool
#define _Bool bool
#endif
2024-10-20 05:21:03 +00:00
#include "_cgo_export.h"
2024-12-07 04:15:57 +00:00
QStringEncoder* QStringEncoder_new() {
return new QStringEncoder();
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QStringEncoder* QStringEncoder_new2(int encoding) {
return new QStringEncoder(static_cast<QStringConverter::Encoding>(encoding));
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QStringEncoder* QStringEncoder_new3(const char* name) {
return new QStringEncoder(name);
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QStringEncoder* QStringEncoder_new4(int encoding, int flags) {
return new QStringEncoder(static_cast<QStringConverter::Encoding>(encoding), static_cast<QStringConverterBase::Flags>(flags));
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QStringEncoder* QStringEncoder_new5(const char* name, int flags) {
return new QStringEncoder(name, static_cast<QStringConverterBase::Flags>(flags));
}
void QStringEncoder_virtbase(QStringEncoder* src, QStringConverter** outptr_QStringConverter) {
*outptr_QStringConverter = static_cast<QStringConverter*>(src);
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-12-07 04:15:57 +00:00
QStringDecoder* QStringDecoder_new(int encoding) {
return new QStringDecoder(static_cast<QStringConverter::Encoding>(encoding));
}
QStringDecoder* QStringDecoder_new2() {
return new QStringDecoder();
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QStringDecoder* QStringDecoder_new3(const char* name) {
return new QStringDecoder(name);
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QStringDecoder* QStringDecoder_new4(int encoding, int flags) {
return new QStringDecoder(static_cast<QStringConverter::Encoding>(encoding), static_cast<QStringConverterBase::Flags>(flags));
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
QStringDecoder* QStringDecoder_new5(const char* name, int f) {
return new QStringDecoder(name, static_cast<QStringConverterBase::Flags>(f));
2024-10-20 05:21:03 +00:00
}
2024-12-07 04:15:57 +00:00
void QStringDecoder_virtbase(QStringDecoder* src, QStringConverter** outptr_QStringConverter) {
*outptr_QStringConverter = static_cast<QStringConverter*>(src);
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
}