2024-08-25 16:08:24 +12:00
# include <QCborMap>
2024-08-29 19:01:51 +12:00
# define WORKAROUND_INNER_CLASS_DEFINITION_QCborMap__ConstIterator
# define WORKAROUND_INNER_CLASS_DEFINITION_QCborMap__Iterator
2024-08-25 16:08:24 +12:00
# include <QCborValue>
2024-11-18 19:12:54 +13:00
# include <QCborValueConstRef>
2024-08-25 16:08:24 +12:00
# include <QCborValueRef>
# include <QJsonObject>
# include <QList>
2024-11-04 20:59:22 +13:00
# include <QMap>
2024-11-26 20:10:11 +13:00
# include <QPair>
2024-08-25 16:08:24 +12:00
# include <QString>
2024-08-29 19:01:51 +12:00
# include <QByteArray>
# include <cstring>
2024-11-04 20:59:22 +13:00
# include <QVariant>
2024-10-16 18:07:56 +13:00
# include <qcbormap.h>
2024-08-29 19:01:51 +12:00
# include "gen_qcbormap.h"
2024-12-11 19:55:47 +13:00
2025-01-07 11:30:33 +01:00
# ifdef __cplusplus
extern " C " {
# endif
# ifdef __cplusplus
} /* extern C */
2024-12-11 19:55:47 +13:00
# endif
2024-08-25 16:08:24 +12:00
2024-12-07 17:15:57 +13:00
QCborMap * QCborMap_new ( ) {
return new QCborMap ( ) ;
2024-08-25 16:08:24 +12:00
}
2024-12-07 17:15:57 +13:00
QCborMap * QCborMap_new2 ( QCborMap * other ) {
return new QCborMap ( * other ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap_operatorAssign ( QCborMap * self , QCborMap * other ) {
2024-08-25 16:08:24 +12:00
self - > operator = ( * other ) ;
}
2025-02-01 13:45:16 +13:00
void QCborMap_swap ( QCborMap * self , QCborMap * other ) {
2024-08-25 16:08:24 +12:00
self - > swap ( * other ) ;
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_toCborValue ( const QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > toCborValue ( ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
ptrdiff_t QCborMap_size ( const QCborMap * self ) {
2024-10-11 18:43:04 +13:00
qsizetype _ret = self - > size ( ) ;
return static_cast < ptrdiff_t > ( _ret ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap_isEmpty ( const QCborMap * self ) {
2024-09-11 17:41:09 +12:00
return self - > isEmpty ( ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap_clear ( QCborMap * self ) {
2024-08-25 16:08:24 +12:00
self - > clear ( ) ;
}
2025-02-01 13:45:16 +13:00
struct miqt_array /* of QCborValue* */ QCborMap_keys ( const QCborMap * self ) {
2024-11-18 19:12:54 +13:00
QList < QCborValue > _ret = self - > keys ( ) ;
2024-09-17 18:29:11 +12:00
// Convert QList<> from C++ memory to manually-managed C memory
QCborValue * * _arr = static_cast < QCborValue * * > ( malloc ( sizeof ( QCborValue * ) * _ret . length ( ) ) ) ;
2024-09-15 10:29:05 +12:00
for ( size_t i = 0 , e = _ret . length ( ) ; i < e ; + + i ) {
_arr [ i ] = new QCborValue ( _ret [ i ] ) ;
2024-08-25 16:08:24 +12:00
}
2024-11-04 20:18:27 +13:00
struct miqt_array _out ;
_out . len = _ret . length ( ) ;
_out . data = static_cast < void * > ( _arr ) ;
2024-09-15 10:29:05 +12:00
return _out ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_value ( const QCborMap * self , long long key ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > value ( static_cast < qint64 > ( key ) ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_value2 ( const QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > value ( key_QString ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_value3 ( const QCborMap * self , QCborValue * key ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > value ( * key ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_operatorSubscript ( const QCborMap * self , long long key ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > operator [ ] ( static_cast < qint64 > ( key ) ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_operatorSubscript2 ( const QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > operator [ ] ( key_QString ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_operatorSubscript3 ( const QCborMap * self , QCborValue * key ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > operator [ ] ( * key ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValueRef * QCborMap_operatorSubscript4 ( QCborMap * self , long long key ) {
2024-09-17 18:29:11 +12:00
return new QCborValueRef ( self - > operator [ ] ( static_cast < qint64 > ( key ) ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValueRef * QCborMap_operatorSubscript6 ( QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-17 18:29:11 +12:00
return new QCborValueRef ( self - > operator [ ] ( key_QString ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValueRef * QCborMap_operatorSubscript7 ( QCborMap * self , QCborValue * key ) {
2024-09-17 18:29:11 +12:00
return new QCborValueRef ( self - > operator [ ] ( * key ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_take ( QCborMap * self , long long key ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > take ( static_cast < qint64 > ( key ) ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_take2 ( QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > take ( key_QString ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_take3 ( QCborMap * self , QCborValue * key ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > take ( * key ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap_remove ( QCborMap * self , long long key ) {
2024-08-29 19:01:51 +12:00
self - > remove ( static_cast < qint64 > ( key ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap_remove2 ( QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-08-25 16:08:24 +12:00
self - > remove ( key_QString ) ;
}
2025-02-01 13:45:16 +13:00
void QCborMap_remove3 ( QCborMap * self , QCborValue * key ) {
2024-08-25 16:08:24 +12:00
self - > remove ( * key ) ;
}
2025-02-01 13:45:16 +13:00
bool QCborMap_contains ( const QCborMap * self , long long key ) {
2024-09-11 17:41:09 +12:00
return self - > contains ( static_cast < qint64 > ( key ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap_contains2 ( const QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-11 17:41:09 +12:00
return self - > contains ( key_QString ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap_contains3 ( const QCborMap * self , QCborValue * key ) {
2024-09-11 17:41:09 +12:00
return self - > contains ( * key ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
int QCborMap_compare ( const QCborMap * self , QCborMap * other ) {
2024-09-11 17:41:09 +12:00
return self - > compare ( * other ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap_operatorEqual ( const QCborMap * self , QCborMap * other ) {
2024-11-22 19:06:01 +13:00
return ( * self = = * other ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap_operatorNotEqual ( const QCborMap * self , QCborMap * other ) {
2024-11-22 19:06:01 +13:00
return ( * self ! = * other ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap_operatorLesser ( const QCborMap * self , QCborMap * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_begin ( QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > begin ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_constBegin ( const QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > constBegin ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_begin2 ( const QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > begin ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_cbegin ( const QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > cbegin ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_end ( QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > end ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_constEnd ( const QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > constEnd ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_end2 ( const QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > end ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_cend ( const QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > cend ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_erase ( QCborMap * self , QCborMap__Iterator * it ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > erase ( * it ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_eraseWithIt ( QCborMap * self , QCborMap__ConstIterator * it ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > erase ( * it ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_extract ( QCborMap * self , QCborMap__Iterator * it ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > extract ( * it ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap_extractWithIt ( QCborMap * self , QCborMap__ConstIterator * it ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > extract ( * it ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap_empty ( const QCborMap * self ) {
2024-09-11 17:41:09 +12:00
return self - > empty ( ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_find ( QCborMap * self , long long key ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > find ( static_cast < qint64 > ( key ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_find2 ( QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > find ( key_QString ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_find3 ( QCborMap * self , QCborValue * key ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > find ( * key ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_constFind ( const QCborMap * self , long long key ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > constFind ( static_cast < qint64 > ( key ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_constFind2 ( const QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > constFind ( key_QString ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_constFind3 ( const QCborMap * self , QCborValue * key ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > constFind ( * key ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_find4 ( const QCborMap * self , long long key ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > find ( static_cast < qint64 > ( key ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_find6 ( const QCborMap * self , struct miqt_string key ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > find ( key_QString ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap_find7 ( const QCborMap * self , QCborValue * key ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > find ( * key ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_insert ( QCborMap * self , long long key , QCborValue * value_ ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > insert ( static_cast < qint64 > ( key ) , * value_ ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_insert3 ( QCborMap * self , struct miqt_string key , QCborValue * value_ ) {
2024-10-19 12:53:33 +13:00
QString key_QString = QString : : fromUtf8 ( key . data , key . len ) ;
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > insert ( key_QString , * value_ ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_insert4 ( QCborMap * self , QCborValue * key , QCborValue * value_ ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > insert ( * key , * value_ ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap_insertWithQCborMapvalueType ( QCborMap * self , struct miqt_map /* tuple of QCborValue* and QCborValue* */ v ) {
2024-11-17 19:21:37 +13:00
QCborMap : : value_type v_QPair ;
QCborValue * * v_first_arr = static_cast < QCborValue * * > ( v . keys ) ;
QCborValue * * v_second_arr = static_cast < QCborValue * * > ( v . values ) ;
v_QPair . first = * ( v_first_arr [ 0 ] ) ;
v_QPair . second = * ( v_second_arr [ 0 ] ) ;
return new QCborMap : : Iterator ( self - > insert ( v_QPair ) ) ;
}
2025-02-01 13:45:16 +13:00
QCborMap * QCborMap_fromVariantMap ( struct miqt_map /* of struct miqt_string to QVariant* */ map ) {
QVariantMap map_QMap ;
struct miqt_string * map_karr = static_cast < struct miqt_string * > ( map . keys ) ;
QVariant * * map_varr = static_cast < QVariant * * > ( map . values ) ;
for ( size_t i = 0 ; i < map . len ; + + i ) {
QString map_karr_i_QString = QString : : fromUtf8 ( map_karr [ i ] . data , map_karr [ i ] . len ) ;
map_QMap [ map_karr_i_QString ] = * ( map_varr [ i ] ) ;
2024-11-04 20:59:22 +13:00
}
2025-02-01 13:45:16 +13:00
return new QCborMap ( QCborMap : : fromVariantMap ( map_QMap ) ) ;
2024-11-04 20:59:22 +13:00
}
2025-02-01 13:45:16 +13:00
QCborMap * QCborMap_fromVariantHash ( struct miqt_map /* of struct miqt_string to QVariant* */ hash ) {
2024-11-04 20:59:22 +13:00
QVariantHash hash_QMap ;
hash_QMap . reserve ( hash . len ) ;
struct miqt_string * hash_karr = static_cast < struct miqt_string * > ( hash . keys ) ;
QVariant * * hash_varr = static_cast < QVariant * * > ( hash . values ) ;
for ( size_t i = 0 ; i < hash . len ; + + i ) {
QString hash_karr_i_QString = QString : : fromUtf8 ( hash_karr [ i ] . data , hash_karr [ i ] . len ) ;
hash_QMap [ hash_karr_i_QString ] = * ( hash_varr [ i ] ) ;
}
return new QCborMap ( QCborMap : : fromVariantHash ( hash_QMap ) ) ;
}
2025-02-01 13:45:16 +13:00
QCborMap * QCborMap_fromJsonObject ( QJsonObject * o ) {
2024-09-17 18:29:11 +12:00
return new QCborMap ( QCborMap : : fromJsonObject ( * o ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
struct miqt_map /* of struct miqt_string to QVariant* */ QCborMap_toVariantMap ( const QCborMap * self ) {
2024-11-04 20:59:22 +13:00
QVariantMap _ret = self - > toVariantMap ( ) ;
// Convert QMap<> from C++ memory to manually-managed C memory
struct miqt_string * _karr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . size ( ) ) ) ;
QVariant * * _varr = static_cast < QVariant * * > ( malloc ( sizeof ( QVariant * ) * _ret . size ( ) ) ) ;
int _ctr = 0 ;
for ( auto _itr = _ret . keyValueBegin ( ) ; _itr ! = _ret . keyValueEnd ( ) ; + + _itr ) {
QString _mapkey_ret = _itr - > first ;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _mapkey_b = _mapkey_ret . toUtf8 ( ) ;
struct miqt_string _mapkey_ms ;
_mapkey_ms . len = _mapkey_b . length ( ) ;
_mapkey_ms . data = static_cast < char * > ( malloc ( _mapkey_ms . len ) ) ;
memcpy ( _mapkey_ms . data , _mapkey_b . data ( ) , _mapkey_ms . len ) ;
_karr [ _ctr ] = _mapkey_ms ;
_varr [ _ctr ] = new QVariant ( _itr - > second ) ;
_ctr + + ;
}
struct miqt_map _out ;
_out . len = _ret . size ( ) ;
_out . keys = static_cast < void * > ( _karr ) ;
_out . values = static_cast < void * > ( _varr ) ;
return _out ;
}
2025-02-01 13:45:16 +13:00
struct miqt_map /* of struct miqt_string to QVariant* */ QCborMap_toVariantHash ( const QCborMap * self ) {
2024-11-04 20:59:22 +13:00
QVariantHash _ret = self - > toVariantHash ( ) ;
// Convert QMap<> from C++ memory to manually-managed C memory
struct miqt_string * _karr = static_cast < struct miqt_string * > ( malloc ( sizeof ( struct miqt_string ) * _ret . size ( ) ) ) ;
QVariant * * _varr = static_cast < QVariant * * > ( malloc ( sizeof ( QVariant * ) * _ret . size ( ) ) ) ;
int _ctr = 0 ;
for ( auto _itr = _ret . keyValueBegin ( ) ; _itr ! = _ret . keyValueEnd ( ) ; + + _itr ) {
QString _hashkey_ret = _itr - > first ;
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _hashkey_b = _hashkey_ret . toUtf8 ( ) ;
struct miqt_string _hashkey_ms ;
_hashkey_ms . len = _hashkey_b . length ( ) ;
_hashkey_ms . data = static_cast < char * > ( malloc ( _hashkey_ms . len ) ) ;
memcpy ( _hashkey_ms . data , _hashkey_b . data ( ) , _hashkey_ms . len ) ;
_karr [ _ctr ] = _hashkey_ms ;
_varr [ _ctr ] = new QVariant ( _itr - > second ) ;
_ctr + + ;
}
struct miqt_map _out ;
_out . len = _ret . size ( ) ;
_out . keys = static_cast < void * > ( _karr ) ;
_out . values = static_cast < void * > ( _varr ) ;
return _out ;
}
2025-02-01 13:45:16 +13:00
QJsonObject * QCborMap_toJsonObject ( const QCborMap * self ) {
2024-09-17 18:29:11 +12:00
return new QJsonObject ( self - > toJsonObject ( ) ) ;
2024-08-25 16:08:24 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap_delete ( QCborMap * self ) {
2025-01-18 17:42:41 +13:00
delete self ;
2024-08-25 16:08:24 +12:00
}
2024-12-07 17:15:57 +13:00
QCborMap__Iterator * QCborMap__Iterator_new ( ) {
return new QCborMap : : Iterator ( ) ;
2024-08-29 19:01:51 +12:00
}
2024-12-07 17:15:57 +13:00
QCborMap__Iterator * QCborMap__Iterator_new2 ( QCborMap__Iterator * param1 ) {
return new QCborMap : : Iterator ( * param1 ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap__Iterator_operatorAssign ( QCborMap__Iterator * self , QCborMap__Iterator * other ) {
2024-09-18 12:12:02 +12:00
self - > operator = ( * other ) ;
}
2025-02-01 13:45:16 +13:00
struct miqt_map /* tuple of QCborValueConstRef* and QCborValueRef* */ QCborMap__Iterator_operatorMultiply ( const QCborMap__Iterator * self ) {
2024-11-17 19:21:37 +13:00
QCborMap : : Iterator : : value_type _ret = self - > operator * ( ) ;
// Convert QPair<> from C++ memory to manually-managed C memory
2024-11-18 19:12:54 +13:00
QCborValueConstRef * * _first_arr = static_cast < QCborValueConstRef * * > ( malloc ( sizeof ( QCborValueConstRef * ) ) ) ;
2024-11-17 19:21:37 +13:00
QCborValueRef * * _second_arr = static_cast < QCborValueRef * * > ( malloc ( sizeof ( QCborValueRef * ) ) ) ;
2024-11-18 19:12:54 +13:00
_first_arr [ 0 ] = new QCborValueConstRef ( _ret . first ) ;
2024-11-17 19:21:37 +13:00
_second_arr [ 0 ] = new QCborValueRef ( _ret . second ) ;
struct miqt_map _out ;
_out . len = 1 ;
_out . keys = static_cast < void * > ( _first_arr ) ;
_out . values = static_cast < void * > ( _second_arr ) ;
return _out ;
}
2025-02-01 13:45:16 +13:00
struct miqt_map /* tuple of QCborValueConstRef* and QCborValueRef* */ QCborMap__Iterator_operatorSubscript ( const QCborMap__Iterator * self , ptrdiff_t j ) {
2024-11-18 19:12:54 +13:00
QCborMap : : Iterator : : value_type _ret = self - > operator [ ] ( ( qsizetype ) ( j ) ) ;
// Convert QPair<> from C++ memory to manually-managed C memory
QCborValueConstRef * * _first_arr = static_cast < QCborValueConstRef * * > ( malloc ( sizeof ( QCborValueConstRef * ) ) ) ;
QCborValueRef * * _second_arr = static_cast < QCborValueRef * * > ( malloc ( sizeof ( QCborValueRef * ) ) ) ;
_first_arr [ 0 ] = new QCborValueConstRef ( _ret . first ) ;
_second_arr [ 0 ] = new QCborValueRef ( _ret . second ) ;
struct miqt_map _out ;
_out . len = 1 ;
_out . keys = static_cast < void * > ( _first_arr ) ;
_out . values = static_cast < void * > ( _second_arr ) ;
return _out ;
}
2025-02-01 13:45:16 +13:00
QCborValueRef * QCborMap__Iterator_operatorMinusGreater ( QCborMap__Iterator * self ) {
2024-09-11 17:41:09 +12:00
return self - > operator - > ( ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValueConstRef * QCborMap__Iterator_operatorMinusGreater2 ( const QCborMap__Iterator * self ) {
2024-11-18 19:12:54 +13:00
return ( QCborValueConstRef * ) self - > operator - > ( ) ;
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap__Iterator_key ( const QCborMap__Iterator * self ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > key ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValueRef * QCborMap__Iterator_value ( const QCborMap__Iterator * self ) {
2024-09-17 18:29:11 +12:00
return new QCborValueRef ( self - > value ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorEqual ( const QCborMap__Iterator * self , QCborMap__Iterator * o ) {
2024-11-22 19:06:01 +13:00
return ( * self = = * o ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorNotEqual ( const QCborMap__Iterator * self , QCborMap__Iterator * o ) {
2024-11-22 19:06:01 +13:00
return ( * self ! = * o ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorLesser ( const QCborMap__Iterator * self , QCborMap__Iterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorLesserOrEqual ( const QCborMap__Iterator * self , QCborMap__Iterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < = * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorGreater ( const QCborMap__Iterator * self , QCborMap__Iterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self > * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorGreaterOrEqual ( const QCborMap__Iterator * self , QCborMap__Iterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self > = * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorEqualWithQCborMapConstIterator ( const QCborMap__Iterator * self , QCborMap__ConstIterator * o ) {
2024-11-22 19:06:01 +13:00
return ( * self = = * o ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorNotEqualWithQCborMapConstIterator ( const QCborMap__Iterator * self , QCborMap__ConstIterator * o ) {
2024-11-22 19:06:01 +13:00
return ( * self ! = * o ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorLesserWithOther ( const QCborMap__Iterator * self , QCborMap__ConstIterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorLesserOrEqualWithOther ( const QCborMap__Iterator * self , QCborMap__ConstIterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < = * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorGreaterWithOther ( const QCborMap__Iterator * self , QCborMap__ConstIterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self > * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__Iterator_operatorGreaterOrEqualWithOther ( const QCborMap__Iterator * self , QCborMap__ConstIterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self > = * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap__Iterator_operatorPlusPlus ( QCborMap__Iterator * self ) {
2024-09-18 12:12:02 +12:00
QCborMap : : Iterator & _ret = self - > operator + + ( ) ;
// Cast returned reference into pointer
return & _ret ;
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap__Iterator_operatorPlusPlusWithInt ( QCborMap__Iterator * self , int param1 ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > operator + + ( static_cast < int > ( param1 ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap__Iterator_operatorMinusMinus ( QCborMap__Iterator * self ) {
2024-09-18 12:12:02 +12:00
QCborMap : : Iterator & _ret = self - > operator - - ( ) ;
// Cast returned reference into pointer
return & _ret ;
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap__Iterator_operatorMinusMinusWithInt ( QCborMap__Iterator * self , int param1 ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : Iterator ( self - > operator - - ( static_cast < int > ( param1 ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap__Iterator_operatorPlusAssign ( QCborMap__Iterator * self , ptrdiff_t j ) {
2024-10-11 18:43:04 +13:00
QCborMap : : Iterator & _ret = self - > operator + = ( ( qsizetype ) ( j ) ) ;
2024-09-18 12:12:02 +12:00
// Cast returned reference into pointer
return & _ret ;
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap__Iterator_operatorMinusAssign ( QCborMap__Iterator * self , ptrdiff_t j ) {
2024-10-11 18:43:04 +13:00
QCborMap : : Iterator & _ret = self - > operator - = ( ( qsizetype ) ( j ) ) ;
2024-09-18 12:12:02 +12:00
// Cast returned reference into pointer
return & _ret ;
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap__Iterator_operatorPlus ( const QCborMap__Iterator * self , ptrdiff_t j ) {
2024-10-11 18:43:04 +13:00
return new QCborMap : : Iterator ( self - > operator + ( ( qsizetype ) ( j ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__Iterator * QCborMap__Iterator_operatorMinus ( const QCborMap__Iterator * self , ptrdiff_t j ) {
2024-10-11 18:43:04 +13:00
return new QCborMap : : Iterator ( self - > operator - ( ( qsizetype ) ( j ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
ptrdiff_t QCborMap__Iterator_operatorMinusWithQCborMapIterator ( const QCborMap__Iterator * self , QCborMap__Iterator * j ) {
2024-10-11 18:43:04 +13:00
qsizetype _ret = self - > operator - ( * j ) ;
return static_cast < ptrdiff_t > ( _ret ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap__Iterator_delete ( QCborMap__Iterator * self ) {
2025-01-18 17:42:41 +13:00
delete self ;
2024-08-29 19:01:51 +12:00
}
2024-12-07 17:15:57 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_new ( ) {
return new QCborMap : : ConstIterator ( ) ;
2024-08-29 19:01:51 +12:00
}
2024-12-07 17:15:57 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_new2 ( QCborMap__ConstIterator * param1 ) {
return new QCborMap : : ConstIterator ( * param1 ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap__ConstIterator_operatorAssign ( QCborMap__ConstIterator * self , QCborMap__ConstIterator * other ) {
2024-09-18 12:12:02 +12:00
self - > operator = ( * other ) ;
}
2025-02-01 13:45:16 +13:00
struct miqt_map /* tuple of QCborValueConstRef* and QCborValueConstRef* */ QCborMap__ConstIterator_operatorMultiply ( const QCborMap__ConstIterator * self ) {
2024-11-17 19:21:37 +13:00
QCborMap : : ConstIterator : : value_type _ret = self - > operator * ( ) ;
// Convert QPair<> from C++ memory to manually-managed C memory
2024-11-18 19:12:54 +13:00
QCborValueConstRef * * _first_arr = static_cast < QCborValueConstRef * * > ( malloc ( sizeof ( QCborValueConstRef * ) ) ) ;
QCborValueConstRef * * _second_arr = static_cast < QCborValueConstRef * * > ( malloc ( sizeof ( QCborValueConstRef * ) ) ) ;
_first_arr [ 0 ] = new QCborValueConstRef ( _ret . first ) ;
_second_arr [ 0 ] = new QCborValueConstRef ( _ret . second ) ;
2024-11-17 19:21:37 +13:00
struct miqt_map _out ;
_out . len = 1 ;
_out . keys = static_cast < void * > ( _first_arr ) ;
_out . values = static_cast < void * > ( _second_arr ) ;
return _out ;
}
2025-02-01 13:45:16 +13:00
struct miqt_map /* tuple of QCborValueConstRef* and QCborValueConstRef* */ QCborMap__ConstIterator_operatorSubscript ( const QCborMap__ConstIterator * self , ptrdiff_t j ) {
2024-11-18 19:12:54 +13:00
QCborMap : : ConstIterator : : value_type _ret = self - > operator [ ] ( ( qsizetype ) ( j ) ) ;
// Convert QPair<> from C++ memory to manually-managed C memory
QCborValueConstRef * * _first_arr = static_cast < QCborValueConstRef * * > ( malloc ( sizeof ( QCborValueConstRef * ) ) ) ;
QCborValueConstRef * * _second_arr = static_cast < QCborValueConstRef * * > ( malloc ( sizeof ( QCborValueConstRef * ) ) ) ;
_first_arr [ 0 ] = new QCborValueConstRef ( _ret . first ) ;
_second_arr [ 0 ] = new QCborValueConstRef ( _ret . second ) ;
struct miqt_map _out ;
_out . len = 1 ;
_out . keys = static_cast < void * > ( _first_arr ) ;
_out . values = static_cast < void * > ( _second_arr ) ;
return _out ;
}
2025-02-01 13:45:16 +13:00
QCborValueConstRef * QCborMap__ConstIterator_operatorMinusGreater ( const QCborMap__ConstIterator * self ) {
2024-11-18 19:12:54 +13:00
return ( QCborValueConstRef * ) self - > operator - > ( ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValue * QCborMap__ConstIterator_key ( const QCborMap__ConstIterator * self ) {
2024-09-17 18:29:11 +12:00
return new QCborValue ( self - > key ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborValueConstRef * QCborMap__ConstIterator_value ( const QCborMap__ConstIterator * self ) {
2024-11-18 19:12:54 +13:00
return new QCborValueConstRef ( self - > value ( ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorEqual ( const QCborMap__ConstIterator * self , QCborMap__Iterator * o ) {
2024-11-22 19:06:01 +13:00
return ( * self = = * o ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorNotEqual ( const QCborMap__ConstIterator * self , QCborMap__Iterator * o ) {
2024-11-22 19:06:01 +13:00
return ( * self ! = * o ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorLesser ( const QCborMap__ConstIterator * self , QCborMap__Iterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorLesserOrEqual ( const QCborMap__ConstIterator * self , QCborMap__Iterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < = * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorGreater ( const QCborMap__ConstIterator * self , QCborMap__Iterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self > * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorGreaterOrEqual ( const QCborMap__ConstIterator * self , QCborMap__Iterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self > = * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorEqualWithQCborMapConstIterator ( const QCborMap__ConstIterator * self , QCborMap__ConstIterator * o ) {
2024-11-22 19:06:01 +13:00
return ( * self = = * o ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorNotEqualWithQCborMapConstIterator ( const QCborMap__ConstIterator * self , QCborMap__ConstIterator * o ) {
2024-11-22 19:06:01 +13:00
return ( * self ! = * o ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorLesserWithOther ( const QCborMap__ConstIterator * self , QCborMap__ConstIterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorLesserOrEqualWithOther ( const QCborMap__ConstIterator * self , QCborMap__ConstIterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self < = * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorGreaterWithOther ( const QCborMap__ConstIterator * self , QCborMap__ConstIterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self > * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborMap__ConstIterator_operatorGreaterOrEqualWithOther ( const QCborMap__ConstIterator * self , QCborMap__ConstIterator * other ) {
2024-11-22 19:06:01 +13:00
return ( * self > = * other ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_operatorPlusPlus ( QCborMap__ConstIterator * self ) {
2024-09-18 12:12:02 +12:00
QCborMap : : ConstIterator & _ret = self - > operator + + ( ) ;
// Cast returned reference into pointer
return & _ret ;
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_operatorPlusPlusWithInt ( QCborMap__ConstIterator * self , int param1 ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > operator + + ( static_cast < int > ( param1 ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_operatorMinusMinus ( QCborMap__ConstIterator * self ) {
2024-09-18 12:12:02 +12:00
QCborMap : : ConstIterator & _ret = self - > operator - - ( ) ;
// Cast returned reference into pointer
return & _ret ;
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_operatorMinusMinusWithInt ( QCborMap__ConstIterator * self , int param1 ) {
2024-09-17 18:29:11 +12:00
return new QCborMap : : ConstIterator ( self - > operator - - ( static_cast < int > ( param1 ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_operatorPlusAssign ( QCborMap__ConstIterator * self , ptrdiff_t j ) {
2024-10-11 18:43:04 +13:00
QCborMap : : ConstIterator & _ret = self - > operator + = ( ( qsizetype ) ( j ) ) ;
2024-09-18 12:12:02 +12:00
// Cast returned reference into pointer
return & _ret ;
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_operatorMinusAssign ( QCborMap__ConstIterator * self , ptrdiff_t j ) {
2024-10-11 18:43:04 +13:00
QCborMap : : ConstIterator & _ret = self - > operator - = ( ( qsizetype ) ( j ) ) ;
2024-09-18 12:12:02 +12:00
// Cast returned reference into pointer
return & _ret ;
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_operatorPlus ( const QCborMap__ConstIterator * self , ptrdiff_t j ) {
2024-10-11 18:43:04 +13:00
return new QCborMap : : ConstIterator ( self - > operator + ( ( qsizetype ) ( j ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
QCborMap__ConstIterator * QCborMap__ConstIterator_operatorMinus ( const QCborMap__ConstIterator * self , ptrdiff_t j ) {
2024-10-11 18:43:04 +13:00
return new QCborMap : : ConstIterator ( self - > operator - ( ( qsizetype ) ( j ) ) ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
ptrdiff_t QCborMap__ConstIterator_operatorMinusWithQCborMapConstIterator ( const QCborMap__ConstIterator * self , QCborMap__ConstIterator * j ) {
2024-10-11 18:43:04 +13:00
qsizetype _ret = self - > operator - ( * j ) ;
return static_cast < ptrdiff_t > ( _ret ) ;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborMap__ConstIterator_delete ( QCborMap__ConstIterator * self ) {
2025-01-18 17:42:41 +13:00
delete self ;
2024-08-29 19:01:51 +12:00
}