miqt/qt6/cbor/gen_qcborvalue.cpp

1169 lines
34 KiB
C++
Raw Normal View History

#include <QByteArray>
#include <QCborArray>
#include <QCborMap>
#include <QCborParserError>
#include <QCborStreamReader>
2024-08-29 19:01:51 +12:00
#include <QCborStreamWriter>
#include <QCborValue>
#include <QCborValueConstRef>
#include <QCborValueRef>
#include <QDateTime>
#include <QJsonValue>
#include <QRegularExpression>
#include <QString>
2024-08-29 19:01:51 +12:00
#include <QByteArray>
#include <cstring>
#include <QUrl>
#include <QUuid>
#include <QVariant>
#include <qcborvalue.h>
2024-08-29 19:01:51 +12:00
#include "gen_qcborvalue.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
} /* extern C */
#endif
2025-02-01 13:45:16 +13:00
struct miqt_string QCborParserError_errorString(const QCborParserError* self) {
QString _ret = self->errorString();
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
void QCborParserError_delete(QCborParserError* self) {
delete self;
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new() {
return new QCborValue();
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new2(int t_) {
return new QCborValue(static_cast<QCborValue::Type>(t_));
2024-08-29 19:01:51 +12:00
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new3(bool b_) {
return new QCborValue(b_);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new4(int i) {
return new QCborValue(static_cast<int>(i));
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new5(unsigned int u) {
return new QCborValue(static_cast<unsigned int>(u));
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new6(long long i) {
return new QCborValue(static_cast<qint64>(i));
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new7(double v) {
return new QCborValue(static_cast<double>(v));
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new8(uint8_t st) {
return new QCborValue(static_cast<QCborSimpleType>(st));
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new9(struct miqt_string ba) {
QByteArray ba_QByteArray(ba.data, ba.len);
2024-12-07 17:15:57 +13:00
return new QCborValue(ba_QByteArray);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new10(struct miqt_string s) {
QString s_QString = QString::fromUtf8(s.data, s.len);
2024-12-07 17:15:57 +13:00
return new QCborValue(s_QString);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new11(const char* s) {
return new QCborValue(s);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new12(QCborArray* a) {
return new QCborValue(*a);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new13(QCborMap* m) {
return new QCborValue(*m);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new14(uint64_t tag) {
return new QCborValue(static_cast<QCborTag>(tag));
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new15(int t_) {
return new QCborValue(static_cast<QCborKnownTags>(t_));
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new16(QDateTime* dt) {
return new QCborValue(*dt);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new17(QUrl* url) {
return new QCborValue(*url);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new18(QRegularExpression* rx) {
return new QCborValue(*rx);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new19(QUuid* uuid) {
return new QCborValue(*uuid);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new20(QCborValue* other) {
return new QCborValue(*other);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new21(uint64_t tag, QCborValue* taggedValue) {
return new QCborValue(static_cast<QCborTag>(tag), *taggedValue);
}
2024-12-07 17:15:57 +13:00
QCborValue* QCborValue_new22(int t_, QCborValue* tv) {
return new QCborValue(static_cast<QCborKnownTags>(t_), *tv);
}
2025-02-01 13:45:16 +13:00
void QCborValue_operatorAssign(QCborValue* self, QCborValue* other) {
self->operator=(*other);
}
2025-02-01 13:45:16 +13:00
void QCborValue_swap(QCborValue* self, QCborValue* other) {
self->swap(*other);
}
2025-02-01 13:45:16 +13:00
int QCborValue_type(const QCborValue* self) {
QCborValue::Type _ret = self->type();
return static_cast<int>(_ret);
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isInteger(const QCborValue* self) {
return self->isInteger();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isByteArray(const QCborValue* self) {
return self->isByteArray();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isString(const QCborValue* self) {
return self->isString();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isArray(const QCborValue* self) {
return self->isArray();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isMap(const QCborValue* self) {
return self->isMap();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isTag(const QCborValue* self) {
return self->isTag();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isFalse(const QCborValue* self) {
return self->isFalse();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isTrue(const QCborValue* self) {
return self->isTrue();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isBool(const QCborValue* self) {
return self->isBool();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isNull(const QCborValue* self) {
return self->isNull();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isUndefined(const QCborValue* self) {
return self->isUndefined();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isDouble(const QCborValue* self) {
return self->isDouble();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isDateTime(const QCborValue* self) {
return self->isDateTime();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isUrl(const QCborValue* self) {
return self->isUrl();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isRegularExpression(const QCborValue* self) {
return self->isRegularExpression();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isUuid(const QCborValue* self) {
return self->isUuid();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isInvalid(const QCborValue* self) {
return self->isInvalid();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isContainer(const QCborValue* self) {
return self->isContainer();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isSimpleType(const QCborValue* self) {
return self->isSimpleType();
}
2025-02-01 13:45:16 +13:00
bool QCborValue_isSimpleTypeWithSt(const QCborValue* self, uint8_t st) {
return self->isSimpleType(static_cast<QCborSimpleType>(st));
}
2025-02-01 13:45:16 +13:00
uint8_t QCborValue_toSimpleType(const QCborValue* self) {
QCborSimpleType _ret = self->toSimpleType();
return static_cast<uint8_t>(_ret);
}
2025-02-01 13:45:16 +13:00
long long QCborValue_toInteger(const QCborValue* self) {
qint64 _ret = self->toInteger();
return static_cast<long long>(_ret);
}
2025-02-01 13:45:16 +13:00
bool QCborValue_toBool(const QCborValue* self) {
return self->toBool();
}
2025-02-01 13:45:16 +13:00
double QCborValue_toDouble(const QCborValue* self) {
return self->toDouble();
}
2025-02-01 13:45:16 +13:00
uint64_t QCborValue_tag(const QCborValue* self) {
QCborTag _ret = self->tag();
return static_cast<uint64_t>(_ret);
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_taggedValue(const QCborValue* self) {
return new QCborValue(self->taggedValue());
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValue_toByteArray(const QCborValue* self) {
QByteArray _qb = self->toByteArray();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValue_toString(const QCborValue* self) {
QString _ret = self->toString();
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
QDateTime* QCborValue_toDateTime(const QCborValue* self) {
return new QDateTime(self->toDateTime());
}
2025-02-01 13:45:16 +13:00
QUrl* QCborValue_toUrl(const QCborValue* self) {
return new QUrl(self->toUrl());
}
2025-02-01 13:45:16 +13:00
QRegularExpression* QCborValue_toRegularExpression(const QCborValue* self) {
return new QRegularExpression(self->toRegularExpression());
}
2025-02-01 13:45:16 +13:00
QUuid* QCborValue_toUuid(const QCborValue* self) {
return new QUuid(self->toUuid());
}
2025-02-01 13:45:16 +13:00
QCborArray* QCborValue_toArray(const QCborValue* self) {
return new QCborArray(self->toArray());
}
2025-02-01 13:45:16 +13:00
QCborArray* QCborValue_toArrayWithDefaultValue(const QCborValue* self, QCborArray* defaultValue) {
return new QCborArray(self->toArray(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QCborMap* QCborValue_toMap(const QCborValue* self) {
return new QCborMap(self->toMap());
}
2025-02-01 13:45:16 +13:00
QCborMap* QCborValue_toMapWithDefaultValue(const QCborValue* self, QCborMap* defaultValue) {
return new QCborMap(self->toMap(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_operatorSubscript(const QCborValue* self, struct miqt_string key) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return new QCborValue(self->operator[](key_QString));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_operatorSubscript2(const QCborValue* self, long long key) {
return new QCborValue(self->operator[](static_cast<qint64>(key)));
}
2025-02-01 13:45:16 +13:00
QCborValueRef* QCborValue_operatorSubscript3(QCborValue* self, long long key) {
return new QCborValueRef(self->operator[](static_cast<qint64>(key)));
}
2025-02-01 13:45:16 +13:00
QCborValueRef* QCborValue_operatorSubscript5(QCborValue* self, struct miqt_string key) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return new QCborValueRef(self->operator[](key_QString));
}
2025-02-01 13:45:16 +13:00
int QCborValue_compare(const QCborValue* self, QCborValue* other) {
return self->compare(*other);
}
2025-02-01 13:45:16 +13:00
bool QCborValue_operatorEqual(const QCborValue* self, QCborValue* other) {
return (*self == *other);
}
2025-02-01 13:45:16 +13:00
bool QCborValue_operatorNotEqual(const QCborValue* self, QCborValue* other) {
return (*self != *other);
}
2025-02-01 13:45:16 +13:00
bool QCborValue_operatorLesser(const QCborValue* self, QCborValue* other) {
return (*self < *other);
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromVariant(QVariant* variant) {
return new QCborValue(QCborValue::fromVariant(*variant));
}
2025-02-01 13:45:16 +13:00
QVariant* QCborValue_toVariant(const QCborValue* self) {
return new QVariant(self->toVariant());
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromJsonValue(QJsonValue* v) {
return new QCborValue(QCborValue::fromJsonValue(*v));
}
2025-02-01 13:45:16 +13:00
QJsonValue* QCborValue_toJsonValue(const QCborValue* self) {
return new QJsonValue(self->toJsonValue());
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromCbor(QCborStreamReader* reader) {
return new QCborValue(QCborValue::fromCbor(*reader));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromCborWithBa(struct miqt_string ba) {
QByteArray ba_QByteArray(ba.data, ba.len);
return new QCborValue(QCborValue::fromCbor(ba_QByteArray));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromCbor2(const char* data, ptrdiff_t len) {
return new QCborValue(QCborValue::fromCbor(data, (qsizetype)(len)));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromCbor3(const unsigned char* data, ptrdiff_t len) {
return new QCborValue(QCborValue::fromCbor(static_cast<const quint8*>(data), (qsizetype)(len)));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValue_toCbor(const QCborValue* self) {
QByteArray _qb = self->toCbor();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborValue_toCborWithWriter(const QCborValue* self, QCborStreamWriter* writer) {
2024-08-29 19:01:51 +12:00
self->toCbor(*writer);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValue_toDiagnosticNotation(const QCborValue* self) {
QString _ret = self->toDiagnosticNotation();
2024-08-29 19:01:51 +12:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
uint8_t QCborValue_toSimpleType1(const QCborValue* self, uint8_t defaultValue) {
QCborSimpleType _ret = self->toSimpleType(static_cast<QCborSimpleType>(defaultValue));
return static_cast<uint8_t>(_ret);
}
2025-02-01 13:45:16 +13:00
long long QCborValue_toInteger1(const QCborValue* self, long long defaultValue) {
qint64 _ret = self->toInteger(static_cast<qint64>(defaultValue));
return static_cast<long long>(_ret);
}
2025-02-01 13:45:16 +13:00
bool QCborValue_toBool1(const QCborValue* self, bool defaultValue) {
return self->toBool(defaultValue);
}
2025-02-01 13:45:16 +13:00
double QCborValue_toDouble1(const QCborValue* self, double defaultValue) {
return self->toDouble(static_cast<double>(defaultValue));
}
2025-02-01 13:45:16 +13:00
uint64_t QCborValue_tag1(const QCborValue* self, uint64_t defaultValue) {
QCborTag _ret = self->tag(static_cast<QCborTag>(defaultValue));
return static_cast<uint64_t>(_ret);
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_taggedValue1(const QCborValue* self, QCborValue* defaultValue) {
return new QCborValue(self->taggedValue(*defaultValue));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValue_toByteArray1(const QCborValue* self, struct miqt_string defaultValue) {
QByteArray defaultValue_QByteArray(defaultValue.data, defaultValue.len);
QByteArray _qb = self->toByteArray(defaultValue_QByteArray);
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValue_toString1(const QCborValue* self, struct miqt_string defaultValue) {
QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len);
QString _ret = self->toString(defaultValue_QString);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
QDateTime* QCborValue_toDateTime1(const QCborValue* self, QDateTime* defaultValue) {
return new QDateTime(self->toDateTime(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QUrl* QCborValue_toUrl1(const QCborValue* self, QUrl* defaultValue) {
return new QUrl(self->toUrl(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QRegularExpression* QCborValue_toRegularExpression1(const QCborValue* self, QRegularExpression* defaultValue) {
return new QRegularExpression(self->toRegularExpression(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QUuid* QCborValue_toUuid1(const QCborValue* self, QUuid* defaultValue) {
return new QUuid(self->toUuid(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromCbor22(struct miqt_string ba, QCborParserError* error) {
QByteArray ba_QByteArray(ba.data, ba.len);
return new QCborValue(QCborValue::fromCbor(ba_QByteArray, error));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromCbor32(const char* data, ptrdiff_t len, QCborParserError* error) {
return new QCborValue(QCborValue::fromCbor(data, (qsizetype)(len), error));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValue_fromCbor33(const unsigned char* data, ptrdiff_t len, QCborParserError* error) {
return new QCborValue(QCborValue::fromCbor(static_cast<const quint8*>(data), (qsizetype)(len), error));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValue_toCbor1(const QCborValue* self, int opt) {
QByteArray _qb = self->toCbor(static_cast<QCborValue::EncodingOptions>(opt));
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborValue_toCbor2(const QCborValue* self, QCborStreamWriter* writer, int opt) {
2024-08-29 19:01:51 +12:00
self->toCbor(*writer, static_cast<QCborValue::EncodingOptions>(opt));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValue_toDiagnosticNotation1(const QCborValue* self, int opts) {
QString _ret = self->toDiagnosticNotation(static_cast<QCborValue::DiagnosticNotationOptions>(opts));
2024-08-29 19:01:51 +12:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborValue_delete(QCborValue* self) {
delete self;
}
2024-12-07 17:15:57 +13:00
QCborValueConstRef* QCborValueConstRef_new(QCborValueConstRef* param1) {
return new QCborValueConstRef(*param1);
}
2025-01-04 12:19:04 +13:00
QCborValue* QCborValueConstRef_ToQCborValue(const QCborValueConstRef* self) {
return new QCborValue(self->operator QCborValue());
}
2025-02-01 13:45:16 +13:00
int QCborValueConstRef_type(const QCborValueConstRef* self) {
QCborValue::Type _ret = self->type();
return static_cast<int>(_ret);
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isInteger(const QCborValueConstRef* self) {
return self->isInteger();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isByteArray(const QCborValueConstRef* self) {
return self->isByteArray();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isString(const QCborValueConstRef* self) {
return self->isString();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isArray(const QCborValueConstRef* self) {
return self->isArray();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isMap(const QCborValueConstRef* self) {
return self->isMap();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isTag(const QCborValueConstRef* self) {
return self->isTag();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isFalse(const QCborValueConstRef* self) {
return self->isFalse();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isTrue(const QCborValueConstRef* self) {
return self->isTrue();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isBool(const QCborValueConstRef* self) {
return self->isBool();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isNull(const QCborValueConstRef* self) {
return self->isNull();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isUndefined(const QCborValueConstRef* self) {
return self->isUndefined();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isDouble(const QCborValueConstRef* self) {
return self->isDouble();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isDateTime(const QCborValueConstRef* self) {
return self->isDateTime();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isUrl(const QCborValueConstRef* self) {
return self->isUrl();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isRegularExpression(const QCborValueConstRef* self) {
return self->isRegularExpression();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isUuid(const QCborValueConstRef* self) {
return self->isUuid();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isInvalid(const QCborValueConstRef* self) {
return self->isInvalid();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isContainer(const QCborValueConstRef* self) {
return self->isContainer();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isSimpleType(const QCborValueConstRef* self) {
return self->isSimpleType();
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_isSimpleTypeWithSt(const QCborValueConstRef* self, uint8_t st) {
return self->isSimpleType(static_cast<QCborSimpleType>(st));
}
2025-02-01 13:45:16 +13:00
uint8_t QCborValueConstRef_toSimpleType(const QCborValueConstRef* self) {
QCborSimpleType _ret = self->toSimpleType();
return static_cast<uint8_t>(_ret);
}
2025-02-01 13:45:16 +13:00
uint64_t QCborValueConstRef_tag(const QCborValueConstRef* self) {
QCborTag _ret = self->tag();
return static_cast<uint64_t>(_ret);
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValueConstRef_taggedValue(const QCborValueConstRef* self) {
return new QCborValue(self->taggedValue());
}
2025-02-01 13:45:16 +13:00
long long QCborValueConstRef_toInteger(const QCborValueConstRef* self) {
qint64 _ret = self->toInteger();
return static_cast<long long>(_ret);
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_toBool(const QCborValueConstRef* self) {
return self->toBool();
}
2025-02-01 13:45:16 +13:00
double QCborValueConstRef_toDouble(const QCborValueConstRef* self) {
return self->toDouble();
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueConstRef_toByteArray(const QCborValueConstRef* self) {
QByteArray _qb = self->toByteArray();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueConstRef_toString(const QCborValueConstRef* self) {
QString _ret = self->toString();
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
QDateTime* QCborValueConstRef_toDateTime(const QCborValueConstRef* self) {
return new QDateTime(self->toDateTime());
}
2025-02-01 13:45:16 +13:00
QUrl* QCborValueConstRef_toUrl(const QCborValueConstRef* self) {
return new QUrl(self->toUrl());
}
2025-02-01 13:45:16 +13:00
QRegularExpression* QCborValueConstRef_toRegularExpression(const QCborValueConstRef* self) {
return new QRegularExpression(self->toRegularExpression());
}
2025-02-01 13:45:16 +13:00
QUuid* QCborValueConstRef_toUuid(const QCborValueConstRef* self) {
return new QUuid(self->toUuid());
}
2025-02-01 13:45:16 +13:00
QCborArray* QCborValueConstRef_toArray(const QCborValueConstRef* self) {
return new QCborArray(self->toArray());
}
2025-02-01 13:45:16 +13:00
QCborArray* QCborValueConstRef_toArrayWithQCborArray(const QCborValueConstRef* self, QCborArray* a) {
return new QCborArray(self->toArray(*a));
}
2025-02-01 13:45:16 +13:00
QCborMap* QCborValueConstRef_toMap(const QCborValueConstRef* self) {
return new QCborMap(self->toMap());
}
2025-02-01 13:45:16 +13:00
QCborMap* QCborValueConstRef_toMapWithQCborMap(const QCborValueConstRef* self, QCborMap* m) {
return new QCborMap(self->toMap(*m));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValueConstRef_operatorSubscript(const QCborValueConstRef* self, struct miqt_string key) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return new QCborValue(self->operator[](key_QString));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValueConstRef_operatorSubscript2(const QCborValueConstRef* self, long long key) {
return new QCborValue(self->operator[](static_cast<qint64>(key)));
}
2025-02-01 13:45:16 +13:00
int QCborValueConstRef_compare(const QCborValueConstRef* self, QCborValue* other) {
return self->compare(*other);
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_operatorEqual(const QCborValueConstRef* self, QCborValue* other) {
return (*self == *other);
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_operatorNotEqual(const QCborValueConstRef* self, QCborValue* other) {
return (*self != *other);
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_operatorLesser(const QCborValueConstRef* self, QCborValue* other) {
return (*self < *other);
}
2025-02-01 13:45:16 +13:00
QVariant* QCborValueConstRef_toVariant(const QCborValueConstRef* self) {
return new QVariant(self->toVariant());
}
2025-02-01 13:45:16 +13:00
QJsonValue* QCborValueConstRef_toJsonValue(const QCborValueConstRef* self) {
return new QJsonValue(self->toJsonValue());
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueConstRef_toCbor(const QCborValueConstRef* self) {
QByteArray _qb = self->toCbor();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
void QCborValueConstRef_toCborWithWriter(const QCborValueConstRef* self, QCborStreamWriter* writer) {
self->toCbor(*writer);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueConstRef_toDiagnosticNotation(const QCborValueConstRef* self) {
QString _ret = self->toDiagnosticNotation();
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
uint8_t QCborValueConstRef_toSimpleType1(const QCborValueConstRef* self, uint8_t defaultValue) {
QCborSimpleType _ret = self->toSimpleType(static_cast<QCborSimpleType>(defaultValue));
return static_cast<uint8_t>(_ret);
}
2025-02-01 13:45:16 +13:00
uint64_t QCborValueConstRef_tag1(const QCborValueConstRef* self, uint64_t defaultValue) {
QCborTag _ret = self->tag(static_cast<QCborTag>(defaultValue));
return static_cast<uint64_t>(_ret);
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValueConstRef_taggedValue1(const QCborValueConstRef* self, QCborValue* defaultValue) {
return new QCborValue(self->taggedValue(*defaultValue));
}
2025-02-01 13:45:16 +13:00
long long QCborValueConstRef_toInteger1(const QCborValueConstRef* self, long long defaultValue) {
qint64 _ret = self->toInteger(static_cast<qint64>(defaultValue));
return static_cast<long long>(_ret);
}
2025-02-01 13:45:16 +13:00
bool QCborValueConstRef_toBool1(const QCborValueConstRef* self, bool defaultValue) {
return self->toBool(defaultValue);
}
2025-02-01 13:45:16 +13:00
double QCborValueConstRef_toDouble1(const QCborValueConstRef* self, double defaultValue) {
return self->toDouble(static_cast<double>(defaultValue));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueConstRef_toByteArray1(const QCborValueConstRef* self, struct miqt_string defaultValue) {
QByteArray defaultValue_QByteArray(defaultValue.data, defaultValue.len);
QByteArray _qb = self->toByteArray(defaultValue_QByteArray);
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueConstRef_toString1(const QCborValueConstRef* self, struct miqt_string defaultValue) {
QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len);
QString _ret = self->toString(defaultValue_QString);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
QDateTime* QCborValueConstRef_toDateTime1(const QCborValueConstRef* self, QDateTime* defaultValue) {
return new QDateTime(self->toDateTime(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QUrl* QCborValueConstRef_toUrl1(const QCborValueConstRef* self, QUrl* defaultValue) {
return new QUrl(self->toUrl(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QRegularExpression* QCborValueConstRef_toRegularExpression1(const QCborValueConstRef* self, QRegularExpression* defaultValue) {
return new QRegularExpression(self->toRegularExpression(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QUuid* QCborValueConstRef_toUuid1(const QCborValueConstRef* self, QUuid* defaultValue) {
return new QUuid(self->toUuid(*defaultValue));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueConstRef_toCbor1(const QCborValueConstRef* self, int opt) {
QByteArray _qb = self->toCbor(static_cast<QCborValue::EncodingOptions>(opt));
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
void QCborValueConstRef_toCbor2(const QCborValueConstRef* self, QCborStreamWriter* writer, int opt) {
self->toCbor(*writer, static_cast<QCborValue::EncodingOptions>(opt));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueConstRef_toDiagnosticNotation1(const QCborValueConstRef* self, int opt) {
QString _ret = self->toDiagnosticNotation(static_cast<QCborValue::DiagnosticNotationOptions>(opt));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
void QCborValueConstRef_delete(QCborValueConstRef* self) {
delete self;
}
2024-12-07 17:15:57 +13:00
QCborValueRef* QCborValueRef_new(QCborValueRef* param1) {
return new QCborValueRef(*param1);
}
void QCborValueRef_virtbase(QCborValueRef* src, QCborValueConstRef** outptr_QCborValueConstRef) {
*outptr_QCborValueConstRef = static_cast<QCborValueConstRef*>(src);
}
2025-02-01 13:45:16 +13:00
void QCborValueRef_operatorAssign(QCborValueRef* self, QCborValue* other) {
self->operator=(*other);
}
2025-02-01 13:45:16 +13:00
void QCborValueRef_operatorAssignWithOther(QCborValueRef* self, QCborValueRef* other) {
self->operator=(*other);
}
2025-02-01 13:45:16 +13:00
QCborValueRef* QCborValueRef_operatorSubscript(QCborValueRef* self, long long key) {
return new QCborValueRef(self->operator[](static_cast<qint64>(key)));
}
2025-02-01 13:45:16 +13:00
QCborValueRef* QCborValueRef_operatorSubscript2(QCborValueRef* self, struct miqt_string key) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return new QCborValueRef(self->operator[](key_QString));
}
2025-01-04 12:19:04 +13:00
QCborValue* QCborValueRef_ToQCborValue(const QCborValueRef* self) {
return new QCborValue(self->operator QCborValue());
}
2025-02-01 13:45:16 +13:00
int QCborValueRef_type(const QCborValueRef* self) {
QCborValue::Type _ret = self->type();
return static_cast<int>(_ret);
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isInteger(const QCborValueRef* self) {
return self->isInteger();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isByteArray(const QCborValueRef* self) {
return self->isByteArray();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isString(const QCborValueRef* self) {
return self->isString();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isArray(const QCborValueRef* self) {
return self->isArray();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isMap(const QCborValueRef* self) {
return self->isMap();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isTag(const QCborValueRef* self) {
return self->isTag();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isFalse(const QCborValueRef* self) {
return self->isFalse();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isTrue(const QCborValueRef* self) {
return self->isTrue();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isBool(const QCborValueRef* self) {
return self->isBool();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isNull(const QCborValueRef* self) {
return self->isNull();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isUndefined(const QCborValueRef* self) {
return self->isUndefined();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isDouble(const QCborValueRef* self) {
return self->isDouble();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isDateTime(const QCborValueRef* self) {
return self->isDateTime();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isUrl(const QCborValueRef* self) {
return self->isUrl();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isRegularExpression(const QCborValueRef* self) {
return self->isRegularExpression();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isUuid(const QCborValueRef* self) {
return self->isUuid();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isInvalid(const QCborValueRef* self) {
return self->isInvalid();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isContainer(const QCborValueRef* self) {
return self->isContainer();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isSimpleType(const QCborValueRef* self) {
return self->isSimpleType();
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_isSimpleTypeWithSt(const QCborValueRef* self, uint8_t st) {
return self->isSimpleType(static_cast<QCborSimpleType>(st));
}
2025-02-01 13:45:16 +13:00
uint8_t QCborValueRef_toSimpleType(const QCborValueRef* self) {
QCborSimpleType _ret = self->toSimpleType();
return static_cast<uint8_t>(_ret);
}
2025-02-01 13:45:16 +13:00
uint64_t QCborValueRef_tag(const QCborValueRef* self) {
QCborTag _ret = self->tag();
return static_cast<uint64_t>(_ret);
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValueRef_taggedValue(const QCborValueRef* self) {
return new QCborValue(self->taggedValue());
}
2025-02-01 13:45:16 +13:00
long long QCborValueRef_toInteger(const QCborValueRef* self) {
qint64 _ret = self->toInteger();
return static_cast<long long>(_ret);
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_toBool(const QCborValueRef* self) {
return self->toBool();
}
2025-02-01 13:45:16 +13:00
double QCborValueRef_toDouble(const QCborValueRef* self) {
return self->toDouble();
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueRef_toByteArray(const QCborValueRef* self) {
QByteArray _qb = self->toByteArray();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueRef_toString(const QCborValueRef* self) {
QString _ret = self->toString();
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
QDateTime* QCborValueRef_toDateTime(const QCborValueRef* self) {
return new QDateTime(self->toDateTime());
}
2025-02-01 13:45:16 +13:00
QUrl* QCborValueRef_toUrl(const QCborValueRef* self) {
return new QUrl(self->toUrl());
}
2025-02-01 13:45:16 +13:00
QRegularExpression* QCborValueRef_toRegularExpression(const QCborValueRef* self) {
return new QRegularExpression(self->toRegularExpression());
}
2025-02-01 13:45:16 +13:00
QUuid* QCborValueRef_toUuid(const QCborValueRef* self) {
return new QUuid(self->toUuid());
}
2025-02-01 13:45:16 +13:00
QCborArray* QCborValueRef_toArray(const QCborValueRef* self) {
return new QCborArray(self->toArray());
}
2025-02-01 13:45:16 +13:00
QCborArray* QCborValueRef_toArrayWithQCborArray(const QCborValueRef* self, QCborArray* a) {
return new QCborArray(self->toArray(*a));
}
2025-02-01 13:45:16 +13:00
QCborMap* QCborValueRef_toMap(const QCborValueRef* self) {
return new QCborMap(self->toMap());
}
2025-02-01 13:45:16 +13:00
QCborMap* QCborValueRef_toMapWithQCborMap(const QCborValueRef* self, QCborMap* m) {
return new QCborMap(self->toMap(*m));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValueRef_operatorSubscript3(const QCborValueRef* self, struct miqt_string key) {
QString key_QString = QString::fromUtf8(key.data, key.len);
return new QCborValue(self->operator[](key_QString));
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValueRef_operatorSubscript5(const QCborValueRef* self, long long key) {
return new QCborValue(self->operator[](static_cast<qint64>(key)));
}
2025-02-01 13:45:16 +13:00
int QCborValueRef_compare(const QCborValueRef* self, QCborValue* other) {
return self->compare(*other);
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_operatorEqual(const QCborValueRef* self, QCborValue* other) {
return (*self == *other);
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_operatorNotEqual(const QCborValueRef* self, QCborValue* other) {
return (*self != *other);
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_operatorLesser(const QCborValueRef* self, QCborValue* other) {
return (*self < *other);
}
2025-02-01 13:45:16 +13:00
QVariant* QCborValueRef_toVariant(const QCborValueRef* self) {
return new QVariant(self->toVariant());
}
2025-02-01 13:45:16 +13:00
QJsonValue* QCborValueRef_toJsonValue(const QCborValueRef* self) {
return new QJsonValue(self->toJsonValue());
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueRef_toCbor(QCborValueRef* self) {
QByteArray _qb = self->toCbor();
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborValueRef_toCborWithWriter(QCborValueRef* self, QCborStreamWriter* writer) {
2024-08-29 19:01:51 +12:00
self->toCbor(*writer);
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueRef_toDiagnosticNotation(QCborValueRef* self) {
QString _ret = self->toDiagnosticNotation();
2024-08-29 19:01:51 +12:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
uint8_t QCborValueRef_toSimpleType1(const QCborValueRef* self, uint8_t defaultValue) {
QCborSimpleType _ret = self->toSimpleType(static_cast<QCborSimpleType>(defaultValue));
return static_cast<uint8_t>(_ret);
}
2025-02-01 13:45:16 +13:00
uint64_t QCborValueRef_tag1(const QCborValueRef* self, uint64_t defaultValue) {
QCborTag _ret = self->tag(static_cast<QCborTag>(defaultValue));
return static_cast<uint64_t>(_ret);
}
2025-02-01 13:45:16 +13:00
QCborValue* QCborValueRef_taggedValue1(const QCborValueRef* self, QCborValue* defaultValue) {
return new QCborValue(self->taggedValue(*defaultValue));
}
2025-02-01 13:45:16 +13:00
long long QCborValueRef_toInteger1(const QCborValueRef* self, long long defaultValue) {
qint64 _ret = self->toInteger(static_cast<qint64>(defaultValue));
return static_cast<long long>(_ret);
}
2025-02-01 13:45:16 +13:00
bool QCborValueRef_toBool1(const QCborValueRef* self, bool defaultValue) {
return self->toBool(defaultValue);
}
2025-02-01 13:45:16 +13:00
double QCborValueRef_toDouble1(const QCborValueRef* self, double defaultValue) {
return self->toDouble(static_cast<double>(defaultValue));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueRef_toByteArray1(const QCborValueRef* self, struct miqt_string defaultValue) {
QByteArray defaultValue_QByteArray(defaultValue.data, defaultValue.len);
QByteArray _qb = self->toByteArray(defaultValue_QByteArray);
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueRef_toString1(const QCborValueRef* self, struct miqt_string defaultValue) {
QString defaultValue_QString = QString::fromUtf8(defaultValue.data, defaultValue.len);
QString _ret = self->toString(defaultValue_QString);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
}
2025-02-01 13:45:16 +13:00
QDateTime* QCborValueRef_toDateTime1(const QCborValueRef* self, QDateTime* defaultValue) {
return new QDateTime(self->toDateTime(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QUrl* QCborValueRef_toUrl1(const QCborValueRef* self, QUrl* defaultValue) {
return new QUrl(self->toUrl(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QRegularExpression* QCborValueRef_toRegularExpression1(const QCborValueRef* self, QRegularExpression* defaultValue) {
return new QRegularExpression(self->toRegularExpression(*defaultValue));
}
2025-02-01 13:45:16 +13:00
QUuid* QCborValueRef_toUuid1(const QCborValueRef* self, QUuid* defaultValue) {
return new QUuid(self->toUuid(*defaultValue));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueRef_toCbor1(QCborValueRef* self, int opt) {
QByteArray _qb = self->toCbor(static_cast<QCborValue::EncodingOptions>(opt));
struct miqt_string _ms;
_ms.len = _qb.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _qb.data(), _ms.len);
return _ms;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborValueRef_toCbor2(QCborValueRef* self, QCborStreamWriter* writer, int opt) {
2024-08-29 19:01:51 +12:00
self->toCbor(*writer, static_cast<QCborValue::EncodingOptions>(opt));
}
2025-02-01 13:45:16 +13:00
struct miqt_string QCborValueRef_toDiagnosticNotation1(QCborValueRef* self, int opt) {
QString _ret = self->toDiagnosticNotation(static_cast<QCborValue::DiagnosticNotationOptions>(opt));
2024-08-29 19:01:51 +12:00
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
struct miqt_string _ms;
_ms.len = _b.length();
_ms.data = static_cast<char*>(malloc(_ms.len));
memcpy(_ms.data, _b.data(), _ms.len);
return _ms;
2024-08-29 19:01:51 +12:00
}
2025-02-01 13:45:16 +13:00
void QCborValueRef_delete(QCborValueRef* self) {
delete self;
}