2024-08-25 04:08:24 +00:00
# include <QByteArray>
# include <QIODevice>
2024-08-29 07:01:51 +00:00
# include <QList>
2024-08-25 04:08:24 +00:00
# include <QString>
2024-08-29 07:01:51 +00:00
# include <QByteArray>
# include <cstring>
2024-08-25 04:08:24 +00:00
# include <QTextCodec>
# include <QXmlStreamAttribute>
# include <QXmlStreamEntityDeclaration>
# include <QXmlStreamEntityResolver>
# include <QXmlStreamNamespaceDeclaration>
# include <QXmlStreamNotationDeclaration>
# include <QXmlStreamReader>
# include <QXmlStreamStringRef>
# include <QXmlStreamWriter>
2024-08-29 07:01:51 +00:00
# include "qxmlstream.h"
# include "gen_qxmlstream.h"
2024-09-14 22:29:05 +00:00
# include "_cgo_export.h"
2024-08-25 04:08:24 +00:00
QXmlStreamStringRef * QXmlStreamStringRef_new ( ) {
return new QXmlStreamStringRef ( ) ;
}
2024-09-14 22:29:05 +00:00
QXmlStreamStringRef * QXmlStreamStringRef_new2 ( struct miqt_string * aString ) {
QString aString_QString = QString : : fromUtf8 ( & aString - > data , aString - > len ) ;
2024-08-25 04:08:24 +00:00
return new QXmlStreamStringRef ( aString_QString ) ;
}
QXmlStreamStringRef * QXmlStreamStringRef_new3 ( QXmlStreamStringRef * other ) {
return new QXmlStreamStringRef ( * other ) ;
}
void QXmlStreamStringRef_OperatorAssign ( QXmlStreamStringRef * self , QXmlStreamStringRef * other ) {
self - > operator = ( * other ) ;
}
void QXmlStreamStringRef_Swap ( QXmlStreamStringRef * self , QXmlStreamStringRef * other ) {
self - > swap ( * other ) ;
}
void QXmlStreamStringRef_Clear ( QXmlStreamStringRef * self ) {
self - > clear ( ) ;
}
2024-09-14 22:29:05 +00:00
struct miqt_string * QXmlStreamStringRef_String ( const QXmlStreamStringRef * self ) {
const QString * _ret = self - > string ( ) ;
2024-08-25 04:08:24 +00:00
// Convert QString pointer from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret - > toUtf8 ( ) ;
return miqt_strdup ( _b . data ( ) , _b . length ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
int QXmlStreamStringRef_Position ( const QXmlStreamStringRef * self ) {
return self - > position ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
int QXmlStreamStringRef_Size ( const QXmlStreamStringRef * self ) {
return self - > size ( ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamStringRef_Delete ( QXmlStreamStringRef * self ) {
delete self ;
}
QXmlStreamAttribute * QXmlStreamAttribute_new ( ) {
return new QXmlStreamAttribute ( ) ;
}
2024-09-14 22:29:05 +00:00
QXmlStreamAttribute * QXmlStreamAttribute_new2 ( struct miqt_string * qualifiedName , struct miqt_string * value ) {
QString qualifiedName_QString = QString : : fromUtf8 ( & qualifiedName - > data , qualifiedName - > len ) ;
QString value_QString = QString : : fromUtf8 ( & value - > data , value - > len ) ;
2024-08-25 04:08:24 +00:00
return new QXmlStreamAttribute ( qualifiedName_QString , value_QString ) ;
}
2024-09-14 22:29:05 +00:00
QXmlStreamAttribute * QXmlStreamAttribute_new3 ( struct miqt_string * namespaceUri , struct miqt_string * name , struct miqt_string * value ) {
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
QString name_QString = QString : : fromUtf8 ( & name - > data , name - > len ) ;
QString value_QString = QString : : fromUtf8 ( & value - > data , value - > len ) ;
2024-08-25 04:08:24 +00:00
return new QXmlStreamAttribute ( namespaceUri_QString , name_QString , value_QString ) ;
}
QXmlStreamAttribute * QXmlStreamAttribute_new4 ( QXmlStreamAttribute * param1 ) {
return new QXmlStreamAttribute ( * param1 ) ;
}
void QXmlStreamAttribute_OperatorAssign ( QXmlStreamAttribute * self , QXmlStreamAttribute * param1 ) {
self - > operator = ( * param1 ) ;
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamAttribute_IsDefault ( const QXmlStreamAttribute * self ) {
return self - > isDefault ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamAttribute_OperatorEqual ( const QXmlStreamAttribute * self , QXmlStreamAttribute * other ) {
return self - > operator = = ( * other ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamAttribute_OperatorNotEqual ( const QXmlStreamAttribute * self , QXmlStreamAttribute * other ) {
return self - > operator ! = ( * other ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamAttribute_Delete ( QXmlStreamAttribute * self ) {
delete self ;
}
QXmlStreamNamespaceDeclaration * QXmlStreamNamespaceDeclaration_new ( ) {
return new QXmlStreamNamespaceDeclaration ( ) ;
}
2024-09-14 22:29:05 +00:00
QXmlStreamNamespaceDeclaration * QXmlStreamNamespaceDeclaration_new2 ( struct miqt_string * prefix , struct miqt_string * namespaceUri ) {
QString prefix_QString = QString : : fromUtf8 ( & prefix - > data , prefix - > len ) ;
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
2024-08-25 04:08:24 +00:00
return new QXmlStreamNamespaceDeclaration ( prefix_QString , namespaceUri_QString ) ;
}
QXmlStreamNamespaceDeclaration * QXmlStreamNamespaceDeclaration_new3 ( QXmlStreamNamespaceDeclaration * param1 ) {
return new QXmlStreamNamespaceDeclaration ( * param1 ) ;
}
void QXmlStreamNamespaceDeclaration_OperatorAssign ( QXmlStreamNamespaceDeclaration * self , QXmlStreamNamespaceDeclaration * param1 ) {
self - > operator = ( * param1 ) ;
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamNamespaceDeclaration_OperatorEqual ( const QXmlStreamNamespaceDeclaration * self , QXmlStreamNamespaceDeclaration * other ) {
return self - > operator = = ( * other ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamNamespaceDeclaration_OperatorNotEqual ( const QXmlStreamNamespaceDeclaration * self , QXmlStreamNamespaceDeclaration * other ) {
return self - > operator ! = ( * other ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamNamespaceDeclaration_Delete ( QXmlStreamNamespaceDeclaration * self ) {
delete self ;
}
QXmlStreamNotationDeclaration * QXmlStreamNotationDeclaration_new ( ) {
return new QXmlStreamNotationDeclaration ( ) ;
}
QXmlStreamNotationDeclaration * QXmlStreamNotationDeclaration_new2 ( QXmlStreamNotationDeclaration * param1 ) {
return new QXmlStreamNotationDeclaration ( * param1 ) ;
}
void QXmlStreamNotationDeclaration_OperatorAssign ( QXmlStreamNotationDeclaration * self , QXmlStreamNotationDeclaration * param1 ) {
self - > operator = ( * param1 ) ;
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamNotationDeclaration_OperatorEqual ( const QXmlStreamNotationDeclaration * self , QXmlStreamNotationDeclaration * other ) {
return self - > operator = = ( * other ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamNotationDeclaration_OperatorNotEqual ( const QXmlStreamNotationDeclaration * self , QXmlStreamNotationDeclaration * other ) {
return self - > operator ! = ( * other ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamNotationDeclaration_Delete ( QXmlStreamNotationDeclaration * self ) {
delete self ;
}
QXmlStreamEntityDeclaration * QXmlStreamEntityDeclaration_new ( ) {
return new QXmlStreamEntityDeclaration ( ) ;
}
QXmlStreamEntityDeclaration * QXmlStreamEntityDeclaration_new2 ( QXmlStreamEntityDeclaration * param1 ) {
return new QXmlStreamEntityDeclaration ( * param1 ) ;
}
void QXmlStreamEntityDeclaration_OperatorAssign ( QXmlStreamEntityDeclaration * self , QXmlStreamEntityDeclaration * param1 ) {
self - > operator = ( * param1 ) ;
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamEntityDeclaration_OperatorEqual ( const QXmlStreamEntityDeclaration * self , QXmlStreamEntityDeclaration * other ) {
return self - > operator = = ( * other ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamEntityDeclaration_OperatorNotEqual ( const QXmlStreamEntityDeclaration * self , QXmlStreamEntityDeclaration * other ) {
return self - > operator ! = ( * other ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamEntityDeclaration_Delete ( QXmlStreamEntityDeclaration * self ) {
delete self ;
}
2024-09-14 22:29:05 +00:00
struct miqt_string * QXmlStreamEntityResolver_ResolveEntity ( QXmlStreamEntityResolver * self , struct miqt_string * publicId , struct miqt_string * systemId ) {
QString publicId_QString = QString : : fromUtf8 ( & publicId - > data , publicId - > len ) ;
QString systemId_QString = QString : : fromUtf8 ( & systemId - > data , systemId - > len ) ;
QString _ret = self - > resolveEntity ( publicId_QString , systemId_QString ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
return miqt_strdup ( _b . data ( ) , _b . length ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_string * QXmlStreamEntityResolver_ResolveUndeclaredEntity ( QXmlStreamEntityResolver * self , struct miqt_string * name ) {
QString name_QString = QString : : fromUtf8 ( & name - > data , name - > len ) ;
QString _ret = self - > resolveUndeclaredEntity ( name_QString ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
return miqt_strdup ( _b . data ( ) , _b . length ( ) ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamEntityResolver_OperatorAssign ( QXmlStreamEntityResolver * self , QXmlStreamEntityResolver * param1 ) {
self - > operator = ( * param1 ) ;
}
void QXmlStreamEntityResolver_Delete ( QXmlStreamEntityResolver * self ) {
delete self ;
}
QXmlStreamReader * QXmlStreamReader_new ( ) {
return new QXmlStreamReader ( ) ;
}
QXmlStreamReader * QXmlStreamReader_new2 ( QIODevice * device ) {
return new QXmlStreamReader ( device ) ;
}
QXmlStreamReader * QXmlStreamReader_new3 ( QByteArray * data ) {
return new QXmlStreamReader ( * data ) ;
}
2024-09-14 22:29:05 +00:00
QXmlStreamReader * QXmlStreamReader_new4 ( struct miqt_string * data ) {
QString data_QString = QString : : fromUtf8 ( & data - > data , data - > len ) ;
2024-08-25 04:08:24 +00:00
return new QXmlStreamReader ( data_QString ) ;
}
2024-08-29 07:01:51 +00:00
QXmlStreamReader * QXmlStreamReader_new5 ( const char * data ) {
2024-08-25 04:08:24 +00:00
return new QXmlStreamReader ( data ) ;
}
void QXmlStreamReader_SetDevice ( QXmlStreamReader * self , QIODevice * device ) {
self - > setDevice ( device ) ;
}
2024-09-11 05:41:09 +00:00
QIODevice * QXmlStreamReader_Device ( const QXmlStreamReader * self ) {
return self - > device ( ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamReader_AddData ( QXmlStreamReader * self , QByteArray * data ) {
self - > addData ( * data ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamReader_AddDataWithData ( QXmlStreamReader * self , struct miqt_string * data ) {
QString data_QString = QString : : fromUtf8 ( & data - > data , data - > len ) ;
2024-08-25 04:08:24 +00:00
self - > addData ( data_QString ) ;
}
2024-08-29 07:01:51 +00:00
void QXmlStreamReader_AddData2 ( QXmlStreamReader * self , const char * data ) {
2024-08-25 04:08:24 +00:00
self - > addData ( data ) ;
}
void QXmlStreamReader_Clear ( QXmlStreamReader * self ) {
self - > clear ( ) ;
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_AtEnd ( const QXmlStreamReader * self ) {
return self - > atEnd ( ) ;
2024-08-29 07:01:51 +00:00
}
uintptr_t QXmlStreamReader_ReadNext ( QXmlStreamReader * self ) {
2024-09-14 22:29:05 +00:00
QXmlStreamReader : : TokenType _ret = self - > readNext ( ) ;
return static_cast < uintptr_t > ( _ret ) ;
2024-08-25 04:08:24 +00:00
}
bool QXmlStreamReader_ReadNextStartElement ( QXmlStreamReader * self ) {
return self - > readNextStartElement ( ) ;
}
void QXmlStreamReader_SkipCurrentElement ( QXmlStreamReader * self ) {
self - > skipCurrentElement ( ) ;
}
2024-09-11 05:41:09 +00:00
uintptr_t QXmlStreamReader_TokenType ( const QXmlStreamReader * self ) {
2024-09-14 22:29:05 +00:00
QXmlStreamReader : : TokenType _ret = self - > tokenType ( ) ;
return static_cast < uintptr_t > ( _ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_string * QXmlStreamReader_TokenString ( const QXmlStreamReader * self ) {
QString _ret = self - > tokenString ( ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
return miqt_strdup ( _b . data ( ) , _b . length ( ) ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamReader_SetNamespaceProcessing ( QXmlStreamReader * self , bool namespaceProcessing ) {
self - > setNamespaceProcessing ( namespaceProcessing ) ;
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_NamespaceProcessing ( const QXmlStreamReader * self ) {
return self - > namespaceProcessing ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsStartDocument ( const QXmlStreamReader * self ) {
return self - > isStartDocument ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsEndDocument ( const QXmlStreamReader * self ) {
return self - > isEndDocument ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsStartElement ( const QXmlStreamReader * self ) {
return self - > isStartElement ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsEndElement ( const QXmlStreamReader * self ) {
return self - > isEndElement ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsCharacters ( const QXmlStreamReader * self ) {
return self - > isCharacters ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsWhitespace ( const QXmlStreamReader * self ) {
return self - > isWhitespace ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsCDATA ( const QXmlStreamReader * self ) {
return self - > isCDATA ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsComment ( const QXmlStreamReader * self ) {
return self - > isComment ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsDTD ( const QXmlStreamReader * self ) {
return self - > isDTD ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsEntityReference ( const QXmlStreamReader * self ) {
return self - > isEntityReference ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsProcessingInstruction ( const QXmlStreamReader * self ) {
return self - > isProcessingInstruction ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_IsStandaloneDocument ( const QXmlStreamReader * self ) {
return self - > isStandaloneDocument ( ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-11 05:41:09 +00:00
long long QXmlStreamReader_LineNumber ( const QXmlStreamReader * self ) {
return self - > lineNumber ( ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-11 05:41:09 +00:00
long long QXmlStreamReader_ColumnNumber ( const QXmlStreamReader * self ) {
return self - > columnNumber ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
long long QXmlStreamReader_CharacterOffset ( const QXmlStreamReader * self ) {
return self - > characterOffset ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_string * QXmlStreamReader_ReadElementText ( QXmlStreamReader * self ) {
QString _ret = self - > readElementText ( ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
return miqt_strdup ( _b . data ( ) , _b . length ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_array * QXmlStreamReader_NamespaceDeclarations ( const QXmlStreamReader * self ) {
QXmlStreamNamespaceDeclarations _ret = self - > namespaceDeclarations ( ) ;
2024-08-29 07:01:51 +00:00
// Convert QList<> from C++ memory to manually-managed C memory of copy-constructed pointers
2024-09-14 22:29:05 +00:00
QXmlStreamNamespaceDeclaration * * _arr = static_cast < QXmlStreamNamespaceDeclaration * * > ( malloc ( sizeof ( QXmlStreamNamespaceDeclaration * * ) * _ret . length ( ) ) ) ;
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QXmlStreamNamespaceDeclaration ( _ret [ i ] ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_array * _out = static_cast < struct miqt_array * > ( malloc ( sizeof ( struct miqt_array ) ) ) ;
_out - > len = _ret . length ( ) ;
_out - > data = static_cast < void * > ( _arr ) ;
return _out ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamReader_AddExtraNamespaceDeclaration ( QXmlStreamReader * self , QXmlStreamNamespaceDeclaration * extraNamespaceDeclaraction ) {
self - > addExtraNamespaceDeclaration ( * extraNamespaceDeclaraction ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamReader_AddExtraNamespaceDeclarations ( QXmlStreamReader * self , struct miqt_array * /* of QXmlStreamNamespaceDeclaration */ extraNamespaceDeclaractions ) {
2024-08-29 07:01:51 +00:00
QVector < QXmlStreamNamespaceDeclaration > extraNamespaceDeclaractions_QList ;
2024-09-14 22:29:05 +00:00
extraNamespaceDeclaractions_QList . reserve ( extraNamespaceDeclaractions - > len ) ;
QXmlStreamNamespaceDeclaration * * extraNamespaceDeclaractions_arr = static_cast < QXmlStreamNamespaceDeclaration * * > ( extraNamespaceDeclaractions - > data ) ;
for ( size_t i = 0 ; i < extraNamespaceDeclaractions - > len ; + + i ) {
extraNamespaceDeclaractions_QList . push_back ( * ( extraNamespaceDeclaractions_arr [ i ] ) ) ;
2024-08-29 07:01:51 +00:00
}
self - > addExtraNamespaceDeclarations ( extraNamespaceDeclaractions_QList ) ;
}
2024-09-14 22:29:05 +00:00
struct miqt_array * QXmlStreamReader_NotationDeclarations ( const QXmlStreamReader * self ) {
QXmlStreamNotationDeclarations _ret = self - > notationDeclarations ( ) ;
2024-08-29 07:01:51 +00:00
// Convert QList<> from C++ memory to manually-managed C memory of copy-constructed pointers
2024-09-14 22:29:05 +00:00
QXmlStreamNotationDeclaration * * _arr = static_cast < QXmlStreamNotationDeclaration * * > ( malloc ( sizeof ( QXmlStreamNotationDeclaration * * ) * _ret . length ( ) ) ) ;
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QXmlStreamNotationDeclaration ( _ret [ i ] ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_array * _out = static_cast < struct miqt_array * > ( malloc ( sizeof ( struct miqt_array ) ) ) ;
_out - > len = _ret . length ( ) ;
_out - > data = static_cast < void * > ( _arr ) ;
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_array * QXmlStreamReader_EntityDeclarations ( const QXmlStreamReader * self ) {
QXmlStreamEntityDeclarations _ret = self - > entityDeclarations ( ) ;
2024-08-29 07:01:51 +00:00
// Convert QList<> from C++ memory to manually-managed C memory of copy-constructed pointers
2024-09-14 22:29:05 +00:00
QXmlStreamEntityDeclaration * * _arr = static_cast < QXmlStreamEntityDeclaration * * > ( malloc ( sizeof ( QXmlStreamEntityDeclaration * * ) * _ret . length ( ) ) ) ;
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QXmlStreamEntityDeclaration ( _ret [ i ] ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_array * _out = static_cast < struct miqt_array * > ( malloc ( sizeof ( struct miqt_array ) ) ) ;
_out - > len = _ret . length ( ) ;
_out - > data = static_cast < void * > ( _arr ) ;
return _out ;
2024-08-29 07:01:51 +00:00
}
2024-09-11 05:41:09 +00:00
int QXmlStreamReader_EntityExpansionLimit ( const QXmlStreamReader * self ) {
return self - > entityExpansionLimit ( ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamReader_SetEntityExpansionLimit ( QXmlStreamReader * self , int limit ) {
self - > setEntityExpansionLimit ( static_cast < int > ( limit ) ) ;
}
void QXmlStreamReader_RaiseError ( QXmlStreamReader * self ) {
self - > raiseError ( ) ;
}
2024-09-14 22:29:05 +00:00
struct miqt_string * QXmlStreamReader_ErrorString ( const QXmlStreamReader * self ) {
QString _ret = self - > errorString ( ) ;
2024-08-25 04:08:24 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
return miqt_strdup ( _b . data ( ) , _b . length ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-11 05:41:09 +00:00
uintptr_t QXmlStreamReader_Error ( const QXmlStreamReader * self ) {
2024-09-14 22:29:05 +00:00
QXmlStreamReader : : Error _ret = self - > error ( ) ;
return static_cast < uintptr_t > ( _ret ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamReader_HasError ( const QXmlStreamReader * self ) {
return self - > hasError ( ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamReader_SetEntityResolver ( QXmlStreamReader * self , QXmlStreamEntityResolver * resolver ) {
self - > setEntityResolver ( resolver ) ;
}
2024-09-11 05:41:09 +00:00
QXmlStreamEntityResolver * QXmlStreamReader_EntityResolver ( const QXmlStreamReader * self ) {
return self - > entityResolver ( ) ;
2024-08-29 07:01:51 +00:00
}
2024-09-14 22:29:05 +00:00
struct miqt_string * QXmlStreamReader_ReadElementText1 ( QXmlStreamReader * self , uintptr_t behaviour ) {
QString _ret = self - > readElementText ( static_cast < QXmlStreamReader : : ReadElementTextBehaviour > ( behaviour ) ) ;
2024-08-29 07:01:51 +00:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
2024-09-14 22:29:05 +00:00
QByteArray _b = _ret . toUtf8 ( ) ;
return miqt_strdup ( _b . data ( ) , _b . length ( ) ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-14 22:29:05 +00:00
void QXmlStreamReader_RaiseError1 ( QXmlStreamReader * self , struct miqt_string * message ) {
QString message_QString = QString : : fromUtf8 ( & message - > data , message - > len ) ;
2024-08-25 04:08:24 +00:00
self - > raiseError ( message_QString ) ;
}
void QXmlStreamReader_Delete ( QXmlStreamReader * self ) {
delete self ;
}
QXmlStreamWriter * QXmlStreamWriter_new ( ) {
return new QXmlStreamWriter ( ) ;
}
QXmlStreamWriter * QXmlStreamWriter_new2 ( QIODevice * device ) {
return new QXmlStreamWriter ( device ) ;
}
QXmlStreamWriter * QXmlStreamWriter_new3 ( QByteArray * array ) {
return new QXmlStreamWriter ( array ) ;
}
void QXmlStreamWriter_SetDevice ( QXmlStreamWriter * self , QIODevice * device ) {
self - > setDevice ( device ) ;
}
2024-09-11 05:41:09 +00:00
QIODevice * QXmlStreamWriter_Device ( const QXmlStreamWriter * self ) {
return self - > device ( ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamWriter_SetCodec ( QXmlStreamWriter * self , QTextCodec * codec ) {
self - > setCodec ( codec ) ;
}
2024-08-29 07:01:51 +00:00
void QXmlStreamWriter_SetCodecWithCodecName ( QXmlStreamWriter * self , const char * codecName ) {
2024-08-25 04:08:24 +00:00
self - > setCodec ( codecName ) ;
}
2024-09-11 05:41:09 +00:00
QTextCodec * QXmlStreamWriter_Codec ( const QXmlStreamWriter * self ) {
return self - > codec ( ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamWriter_SetAutoFormatting ( QXmlStreamWriter * self , bool autoFormatting ) {
self - > setAutoFormatting ( autoFormatting ) ;
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamWriter_AutoFormatting ( const QXmlStreamWriter * self ) {
return self - > autoFormatting ( ) ;
2024-08-25 04:08:24 +00:00
}
void QXmlStreamWriter_SetAutoFormattingIndent ( QXmlStreamWriter * self , int spacesOrTabs ) {
self - > setAutoFormattingIndent ( static_cast < int > ( spacesOrTabs ) ) ;
}
2024-09-11 05:41:09 +00:00
int QXmlStreamWriter_AutoFormattingIndent ( const QXmlStreamWriter * self ) {
return self - > autoFormattingIndent ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteAttribute ( QXmlStreamWriter * self , struct miqt_string * qualifiedName , struct miqt_string * value ) {
QString qualifiedName_QString = QString : : fromUtf8 ( & qualifiedName - > data , qualifiedName - > len ) ;
QString value_QString = QString : : fromUtf8 ( & value - > data , value - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeAttribute ( qualifiedName_QString , value_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteAttribute2 ( QXmlStreamWriter * self , struct miqt_string * namespaceUri , struct miqt_string * name , struct miqt_string * value ) {
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
QString name_QString = QString : : fromUtf8 ( & name - > data , name - > len ) ;
QString value_QString = QString : : fromUtf8 ( & value - > data , value - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeAttribute ( namespaceUri_QString , name_QString , value_QString ) ;
}
void QXmlStreamWriter_WriteAttributeWithAttribute ( QXmlStreamWriter * self , QXmlStreamAttribute * attribute ) {
self - > writeAttribute ( * attribute ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteCDATA ( QXmlStreamWriter * self , struct miqt_string * text ) {
QString text_QString = QString : : fromUtf8 ( & text - > data , text - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeCDATA ( text_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteCharacters ( QXmlStreamWriter * self , struct miqt_string * text ) {
QString text_QString = QString : : fromUtf8 ( & text - > data , text - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeCharacters ( text_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteComment ( QXmlStreamWriter * self , struct miqt_string * text ) {
QString text_QString = QString : : fromUtf8 ( & text - > data , text - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeComment ( text_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteDTD ( QXmlStreamWriter * self , struct miqt_string * dtd ) {
QString dtd_QString = QString : : fromUtf8 ( & dtd - > data , dtd - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeDTD ( dtd_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteEmptyElement ( QXmlStreamWriter * self , struct miqt_string * qualifiedName ) {
QString qualifiedName_QString = QString : : fromUtf8 ( & qualifiedName - > data , qualifiedName - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeEmptyElement ( qualifiedName_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteEmptyElement2 ( QXmlStreamWriter * self , struct miqt_string * namespaceUri , struct miqt_string * name ) {
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
QString name_QString = QString : : fromUtf8 ( & name - > data , name - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeEmptyElement ( namespaceUri_QString , name_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteTextElement ( QXmlStreamWriter * self , struct miqt_string * qualifiedName , struct miqt_string * text ) {
QString qualifiedName_QString = QString : : fromUtf8 ( & qualifiedName - > data , qualifiedName - > len ) ;
QString text_QString = QString : : fromUtf8 ( & text - > data , text - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeTextElement ( qualifiedName_QString , text_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteTextElement2 ( QXmlStreamWriter * self , struct miqt_string * namespaceUri , struct miqt_string * name , struct miqt_string * text ) {
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
QString name_QString = QString : : fromUtf8 ( & name - > data , name - > len ) ;
QString text_QString = QString : : fromUtf8 ( & text - > data , text - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeTextElement ( namespaceUri_QString , name_QString , text_QString ) ;
}
void QXmlStreamWriter_WriteEndDocument ( QXmlStreamWriter * self ) {
self - > writeEndDocument ( ) ;
}
void QXmlStreamWriter_WriteEndElement ( QXmlStreamWriter * self ) {
self - > writeEndElement ( ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteEntityReference ( QXmlStreamWriter * self , struct miqt_string * name ) {
QString name_QString = QString : : fromUtf8 ( & name - > data , name - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeEntityReference ( name_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteNamespace ( QXmlStreamWriter * self , struct miqt_string * namespaceUri ) {
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeNamespace ( namespaceUri_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteDefaultNamespace ( QXmlStreamWriter * self , struct miqt_string * namespaceUri ) {
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeDefaultNamespace ( namespaceUri_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteProcessingInstruction ( QXmlStreamWriter * self , struct miqt_string * target ) {
QString target_QString = QString : : fromUtf8 ( & target - > data , target - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeProcessingInstruction ( target_QString ) ;
}
void QXmlStreamWriter_WriteStartDocument ( QXmlStreamWriter * self ) {
self - > writeStartDocument ( ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteStartDocumentWithVersion ( QXmlStreamWriter * self , struct miqt_string * version ) {
QString version_QString = QString : : fromUtf8 ( & version - > data , version - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeStartDocument ( version_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteStartDocument2 ( QXmlStreamWriter * self , struct miqt_string * version , bool standalone ) {
QString version_QString = QString : : fromUtf8 ( & version - > data , version - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeStartDocument ( version_QString , standalone ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteStartElement ( QXmlStreamWriter * self , struct miqt_string * qualifiedName ) {
QString qualifiedName_QString = QString : : fromUtf8 ( & qualifiedName - > data , qualifiedName - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeStartElement ( qualifiedName_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteStartElement2 ( QXmlStreamWriter * self , struct miqt_string * namespaceUri , struct miqt_string * name ) {
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
QString name_QString = QString : : fromUtf8 ( & name - > data , name - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeStartElement ( namespaceUri_QString , name_QString ) ;
}
void QXmlStreamWriter_WriteCurrentToken ( QXmlStreamWriter * self , QXmlStreamReader * reader ) {
self - > writeCurrentToken ( * reader ) ;
}
2024-09-11 05:41:09 +00:00
bool QXmlStreamWriter_HasError ( const QXmlStreamWriter * self ) {
return self - > hasError ( ) ;
2024-08-25 04:08:24 +00:00
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteNamespace2 ( QXmlStreamWriter * self , struct miqt_string * namespaceUri , struct miqt_string * prefix ) {
QString namespaceUri_QString = QString : : fromUtf8 ( & namespaceUri - > data , namespaceUri - > len ) ;
QString prefix_QString = QString : : fromUtf8 ( & prefix - > data , prefix - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeNamespace ( namespaceUri_QString , prefix_QString ) ;
}
2024-09-14 22:29:05 +00:00
void QXmlStreamWriter_WriteProcessingInstruction2 ( QXmlStreamWriter * self , struct miqt_string * target , struct miqt_string * data ) {
QString target_QString = QString : : fromUtf8 ( & target - > data , target - > len ) ;
QString data_QString = QString : : fromUtf8 ( & data - > data , data - > len ) ;
2024-08-25 04:08:24 +00:00
self - > writeProcessingInstruction ( target_QString , data_QString ) ;
}
void QXmlStreamWriter_Delete ( QXmlStreamWriter * self ) {
delete self ;
}