qt: rebuild for new enum underlying types

This commit is contained in:
mappu 2024-09-16 19:04:28 +12:00
parent 8d9a7cfd2e
commit 2c40f8dc73
12 changed files with 254 additions and 46 deletions

View File

@ -13,7 +13,7 @@ import (
"unsafe" "unsafe"
) )
type QCborSimpleType int type QCborSimpleType byte
const ( const (
QCborSimpleType__False QCborSimpleType = 20 QCborSimpleType__False QCborSimpleType = 20
@ -22,6 +22,8 @@ const (
QCborSimpleType__Undefined QCborSimpleType = 23 QCborSimpleType__Undefined QCborSimpleType = 23
) )
type QCborTag uint64
type QCborKnownTags int type QCborKnownTags int
const ( const (
@ -50,6 +52,8 @@ const (
QCborKnownTags__Signature QCborKnownTags = 55799 QCborKnownTags__Signature QCborKnownTags = 55799
) )
type QCborNegativeInteger uint64
type QCborError__Code int type QCborError__Code int
const ( const (

View File

@ -146,6 +146,10 @@ bool QCborStreamReader_IsInvalid(const QCborStreamReader* self) {
return self->isInvalid(); return self->isInvalid();
} }
bool QCborStreamReader_IsSimpleTypeWithSt(const QCborStreamReader* self, QCborSimpleType st) {
return self->isSimpleType(st);
}
bool QCborStreamReader_IsFalse(const QCborStreamReader* self) { bool QCborStreamReader_IsFalse(const QCborStreamReader* self) {
return self->isFalse(); return self->isFalse();
} }
@ -194,10 +198,22 @@ bool QCborStreamReader_ToBool(const QCborStreamReader* self) {
return self->toBool(); return self->toBool();
} }
QCborTag QCborStreamReader_ToTag(const QCborStreamReader* self) {
return self->toTag();
}
unsigned long long QCborStreamReader_ToUnsignedInteger(const QCborStreamReader* self) { unsigned long long QCborStreamReader_ToUnsignedInteger(const QCborStreamReader* self) {
return self->toUnsignedInteger(); return self->toUnsignedInteger();
} }
QCborNegativeInteger QCborStreamReader_ToNegativeInteger(const QCborStreamReader* self) {
return self->toNegativeInteger();
}
QCborSimpleType QCborStreamReader_ToSimpleType(const QCborStreamReader* self) {
return self->toSimpleType();
}
float QCborStreamReader_ToFloat(const QCborStreamReader* self) { float QCborStreamReader_ToFloat(const QCborStreamReader* self) {
return self->toFloat(); return self->toFloat();
} }

View File

@ -13,7 +13,7 @@ import (
"unsafe" "unsafe"
) )
type QCborStreamReader__Type int type QCborStreamReader__Type byte
const ( const (
QCborStreamReader__Type__UnsignedInteger QCborStreamReader__Type = 0 QCborStreamReader__Type__UnsignedInteger QCborStreamReader__Type = 0
@ -237,6 +237,11 @@ func (this *QCborStreamReader) IsInvalid() bool {
return (bool)(_ret) return (bool)(_ret)
} }
func (this *QCborStreamReader) IsSimpleTypeWithSt(st QCborSimpleType) bool {
_ret := C.QCborStreamReader_IsSimpleTypeWithSt(this.h, st)
return (bool)(_ret)
}
func (this *QCborStreamReader) IsFalse() bool { func (this *QCborStreamReader) IsFalse() bool {
_ret := C.QCborStreamReader_IsFalse(this.h) _ret := C.QCborStreamReader_IsFalse(this.h)
return (bool)(_ret) return (bool)(_ret)
@ -297,11 +302,23 @@ func (this *QCborStreamReader) ToBool() bool {
return (bool)(_ret) return (bool)(_ret)
} }
func (this *QCborStreamReader) ToTag() QCborTag {
return C.QCborStreamReader_ToTag(this.h)
}
func (this *QCborStreamReader) ToUnsignedInteger() uint64 { func (this *QCborStreamReader) ToUnsignedInteger() uint64 {
_ret := C.QCborStreamReader_ToUnsignedInteger(this.h) _ret := C.QCborStreamReader_ToUnsignedInteger(this.h)
return (uint64)(_ret) return (uint64)(_ret)
} }
func (this *QCborStreamReader) ToNegativeInteger() QCborNegativeInteger {
return C.QCborStreamReader_ToNegativeInteger(this.h)
}
func (this *QCborStreamReader) ToSimpleType() QCborSimpleType {
return C.QCborStreamReader_ToSimpleType(this.h)
}
func (this *QCborStreamReader) ToFloat() float32 { func (this *QCborStreamReader) ToFloat() float32 {
_ret := C.QCborStreamReader_ToFloat(this.h) _ret := C.QCborStreamReader_ToFloat(this.h)
return (float32)(_ret) return (float32)(_ret)

View File

@ -59,6 +59,7 @@ bool QCborStreamReader_IsFloat16(const QCborStreamReader* self);
bool QCborStreamReader_IsFloat(const QCborStreamReader* self); bool QCborStreamReader_IsFloat(const QCborStreamReader* self);
bool QCborStreamReader_IsDouble(const QCborStreamReader* self); bool QCborStreamReader_IsDouble(const QCborStreamReader* self);
bool QCborStreamReader_IsInvalid(const QCborStreamReader* self); bool QCborStreamReader_IsInvalid(const QCborStreamReader* self);
bool QCborStreamReader_IsSimpleTypeWithSt(const QCborStreamReader* self, QCborSimpleType st);
bool QCborStreamReader_IsFalse(const QCborStreamReader* self); bool QCborStreamReader_IsFalse(const QCborStreamReader* self);
bool QCborStreamReader_IsTrue(const QCborStreamReader* self); bool QCborStreamReader_IsTrue(const QCborStreamReader* self);
bool QCborStreamReader_IsBool(const QCborStreamReader* self); bool QCborStreamReader_IsBool(const QCborStreamReader* self);
@ -71,7 +72,10 @@ bool QCborStreamReader_EnterContainer(QCborStreamReader* self);
bool QCborStreamReader_LeaveContainer(QCborStreamReader* self); bool QCborStreamReader_LeaveContainer(QCborStreamReader* self);
size_t QCborStreamReader_CurrentStringChunkSize(const QCborStreamReader* self); size_t QCborStreamReader_CurrentStringChunkSize(const QCborStreamReader* self);
bool QCborStreamReader_ToBool(const QCborStreamReader* self); bool QCborStreamReader_ToBool(const QCborStreamReader* self);
QCborTag QCborStreamReader_ToTag(const QCborStreamReader* self);
unsigned long long QCborStreamReader_ToUnsignedInteger(const QCborStreamReader* self); unsigned long long QCborStreamReader_ToUnsignedInteger(const QCborStreamReader* self);
QCborNegativeInteger QCborStreamReader_ToNegativeInteger(const QCborStreamReader* self);
QCborSimpleType QCborStreamReader_ToSimpleType(const QCborStreamReader* self);
float QCborStreamReader_ToFloat(const QCborStreamReader* self); float QCborStreamReader_ToFloat(const QCborStreamReader* self);
double QCborStreamReader_ToDouble(const QCborStreamReader* self); double QCborStreamReader_ToDouble(const QCborStreamReader* self);
long long QCborStreamReader_ToInteger(const QCborStreamReader* self); long long QCborStreamReader_ToInteger(const QCborStreamReader* self);

View File

@ -29,10 +29,26 @@ void QCborStreamWriter_AppendWithQint64(QCborStreamWriter* self, long long i) {
self->append(static_cast<qint64>(i)); self->append(static_cast<qint64>(i));
} }
void QCborStreamWriter_AppendWithQCborNegativeInteger(QCborStreamWriter* self, QCborNegativeInteger n) {
self->append(n);
}
void QCborStreamWriter_AppendWithBa(QCborStreamWriter* self, QByteArray* ba) { void QCborStreamWriter_AppendWithBa(QCborStreamWriter* self, QByteArray* ba) {
self->append(*ba); self->append(*ba);
} }
void QCborStreamWriter_AppendWithTag(QCborStreamWriter* self, QCborTag tag) {
self->append(tag);
}
void QCborStreamWriter_Append3(QCborStreamWriter* self, QCborKnownTags tag) {
self->append(tag);
}
void QCborStreamWriter_AppendWithSt(QCborStreamWriter* self, QCborSimpleType st) {
self->append(st);
}
void QCborStreamWriter_AppendWithFloat(QCborStreamWriter* self, float f) { void QCborStreamWriter_AppendWithFloat(QCborStreamWriter* self, float f) {
self->append(static_cast<float>(f)); self->append(static_cast<float>(f));
} }

View File

@ -64,10 +64,26 @@ func (this *QCborStreamWriter) AppendWithQint64(i int64) {
C.QCborStreamWriter_AppendWithQint64(this.h, (C.longlong)(i)) C.QCborStreamWriter_AppendWithQint64(this.h, (C.longlong)(i))
} }
func (this *QCborStreamWriter) AppendWithQCborNegativeInteger(n QCborNegativeInteger) {
C.QCborStreamWriter_AppendWithQCborNegativeInteger(this.h, n)
}
func (this *QCborStreamWriter) AppendWithBa(ba *QByteArray) { func (this *QCborStreamWriter) AppendWithBa(ba *QByteArray) {
C.QCborStreamWriter_AppendWithBa(this.h, ba.cPointer()) C.QCborStreamWriter_AppendWithBa(this.h, ba.cPointer())
} }
func (this *QCborStreamWriter) AppendWithTag(tag QCborTag) {
C.QCborStreamWriter_AppendWithTag(this.h, tag)
}
func (this *QCborStreamWriter) Append3(tag QCborKnownTags) {
C.QCborStreamWriter_Append3(this.h, tag)
}
func (this *QCborStreamWriter) AppendWithSt(st QCborSimpleType) {
C.QCborStreamWriter_AppendWithSt(this.h, st)
}
func (this *QCborStreamWriter) AppendWithFloat(f float32) { func (this *QCborStreamWriter) AppendWithFloat(f float32) {
C.QCborStreamWriter_AppendWithFloat(this.h, (C.float)(f)) C.QCborStreamWriter_AppendWithFloat(this.h, (C.float)(f))
} }

View File

@ -29,7 +29,11 @@ void QCborStreamWriter_SetDevice(QCborStreamWriter* self, QIODevice* device);
QIODevice* QCborStreamWriter_Device(const QCborStreamWriter* self); QIODevice* QCborStreamWriter_Device(const QCborStreamWriter* self);
void QCborStreamWriter_Append(QCborStreamWriter* self, unsigned long long u); void QCborStreamWriter_Append(QCborStreamWriter* self, unsigned long long u);
void QCborStreamWriter_AppendWithQint64(QCborStreamWriter* self, long long i); void QCborStreamWriter_AppendWithQint64(QCborStreamWriter* self, long long i);
void QCborStreamWriter_AppendWithQCborNegativeInteger(QCborStreamWriter* self, QCborNegativeInteger n);
void QCborStreamWriter_AppendWithBa(QCborStreamWriter* self, QByteArray* ba); void QCborStreamWriter_AppendWithBa(QCborStreamWriter* self, QByteArray* ba);
void QCborStreamWriter_AppendWithTag(QCborStreamWriter* self, QCborTag tag);
void QCborStreamWriter_Append3(QCborStreamWriter* self, QCborKnownTags tag);
void QCborStreamWriter_AppendWithSt(QCborStreamWriter* self, QCborSimpleType st);
void QCborStreamWriter_AppendWithFloat(QCborStreamWriter* self, float f); void QCborStreamWriter_AppendWithFloat(QCborStreamWriter* self, float f);
void QCborStreamWriter_AppendWithDouble(QCborStreamWriter* self, double d); void QCborStreamWriter_AppendWithDouble(QCborStreamWriter* self, double d);
void QCborStreamWriter_AppendByteString(QCborStreamWriter* self, const char* data, size_t lenVal); void QCborStreamWriter_AppendByteString(QCborStreamWriter* self, const char* data, size_t lenVal);

View File

@ -58,47 +58,67 @@ QCborValue* QCborValue_new7(double v) {
return new QCborValue(static_cast<double>(v)); return new QCborValue(static_cast<double>(v));
} }
QCborValue* QCborValue_new8(QByteArray* ba) { QCborValue* QCborValue_new8(QCborSimpleType st) {
return new QCborValue(st);
}
QCborValue* QCborValue_new9(QByteArray* ba) {
return new QCborValue(*ba); return new QCborValue(*ba);
} }
QCborValue* QCborValue_new9(struct miqt_string* s) { QCborValue* QCborValue_new10(struct miqt_string* s) {
QString s_QString = QString::fromUtf8(&s->data, s->len); QString s_QString = QString::fromUtf8(&s->data, s->len);
return new QCborValue(s_QString); return new QCborValue(s_QString);
} }
QCborValue* QCborValue_new10(const char* s) { QCborValue* QCborValue_new11(const char* s) {
return new QCborValue(s); return new QCborValue(s);
} }
QCborValue* QCborValue_new11(QCborArray* a) { QCborValue* QCborValue_new12(QCborArray* a) {
return new QCborValue(*a); return new QCborValue(*a);
} }
QCborValue* QCborValue_new12(QCborMap* m) { QCborValue* QCborValue_new13(QCborMap* m) {
return new QCborValue(*m); return new QCborValue(*m);
} }
QCborValue* QCborValue_new13(QDateTime* dt) { QCborValue* QCborValue_new14(QCborTag tag) {
return new QCborValue(tag);
}
QCborValue* QCborValue_new15(QCborKnownTags t_) {
return new QCborValue(t_);
}
QCborValue* QCborValue_new16(QDateTime* dt) {
return new QCborValue(*dt); return new QCborValue(*dt);
} }
QCborValue* QCborValue_new14(QUrl* url) { QCborValue* QCborValue_new17(QUrl* url) {
return new QCborValue(*url); return new QCborValue(*url);
} }
QCborValue* QCborValue_new15(QRegularExpression* rx) { QCborValue* QCborValue_new18(QRegularExpression* rx) {
return new QCborValue(*rx); return new QCborValue(*rx);
} }
QCborValue* QCborValue_new16(QUuid* uuid) { QCborValue* QCborValue_new19(QUuid* uuid) {
return new QCborValue(*uuid); return new QCborValue(*uuid);
} }
QCborValue* QCborValue_new17(QCborValue* other) { QCborValue* QCborValue_new20(QCborValue* other) {
return new QCborValue(*other); return new QCborValue(*other);
} }
QCborValue* QCborValue_new21(QCborTag tag, QCborValue* taggedValue) {
return new QCborValue(tag, *taggedValue);
}
QCborValue* QCborValue_new22(QCborKnownTags t_, QCborValue* tv) {
return new QCborValue(t_, *tv);
}
void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other) { void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other) {
self->operator=(*other); self->operator=(*other);
} }
@ -188,6 +208,14 @@ bool QCborValue_IsSimpleType(const QCborValue* self) {
return self->isSimpleType(); return self->isSimpleType();
} }
bool QCborValue_IsSimpleTypeWithSt(const QCborValue* self, QCborSimpleType st) {
return self->isSimpleType(st);
}
QCborSimpleType QCborValue_ToSimpleType(const QCborValue* self) {
return self->toSimpleType();
}
long long QCborValue_ToInteger(const QCborValue* self) { long long QCborValue_ToInteger(const QCborValue* self) {
return self->toInteger(); return self->toInteger();
} }
@ -200,6 +228,10 @@ double QCborValue_ToDouble(const QCborValue* self) {
return self->toDouble(); return self->toDouble();
} }
QCborTag QCborValue_Tag(const QCborValue* self) {
return self->tag();
}
QCborValue* QCborValue_TaggedValue(const QCborValue* self) { QCborValue* QCborValue_TaggedValue(const QCborValue* self) {
QCborValue _ret = self->taggedValue(); QCborValue _ret = self->taggedValue();
// Copy-construct value returned type into heap-allocated copy // Copy-construct value returned type into heap-allocated copy
@ -374,6 +406,10 @@ struct miqt_string* QCborValue_ToDiagnosticNotation(const QCborValue* self) {
return miqt_strdup(_b.data(), _b.length()); return miqt_strdup(_b.data(), _b.length());
} }
QCborSimpleType QCborValue_ToSimpleType1(const QCborValue* self, QCborSimpleType defaultValue) {
return self->toSimpleType(defaultValue);
}
long long QCborValue_ToInteger1(const QCborValue* self, long long defaultValue) { long long QCborValue_ToInteger1(const QCborValue* self, long long defaultValue) {
return self->toInteger(static_cast<qint64>(defaultValue)); return self->toInteger(static_cast<qint64>(defaultValue));
} }
@ -386,6 +422,10 @@ double QCborValue_ToDouble1(const QCborValue* self, double defaultValue) {
return self->toDouble(static_cast<double>(defaultValue)); return self->toDouble(static_cast<double>(defaultValue));
} }
QCborTag QCborValue_Tag1(const QCborValue* self, QCborTag defaultValue) {
return self->tag(defaultValue);
}
QCborValue* QCborValue_TaggedValue1(const QCborValue* self, QCborValue* defaultValue) { QCborValue* QCborValue_TaggedValue1(const QCborValue* self, QCborValue* defaultValue) {
QCborValue _ret = self->taggedValue(*defaultValue); QCborValue _ret = self->taggedValue(*defaultValue);
// Copy-construct value returned type into heap-allocated copy // Copy-construct value returned type into heap-allocated copy
@ -562,6 +602,14 @@ bool QCborValueRef_IsSimpleType(const QCborValueRef* self) {
return self->isSimpleType(); return self->isSimpleType();
} }
bool QCborValueRef_IsSimpleTypeWithSt(const QCborValueRef* self, QCborSimpleType st) {
return self->isSimpleType(st);
}
QCborTag QCborValueRef_Tag(const QCborValueRef* self) {
return self->tag();
}
QCborValue* QCborValueRef_TaggedValue(const QCborValueRef* self) { QCborValue* QCborValueRef_TaggedValue(const QCborValueRef* self) {
QCborValue _ret = self->taggedValue(); QCborValue _ret = self->taggedValue();
// Copy-construct value returned type into heap-allocated copy // Copy-construct value returned type into heap-allocated copy
@ -712,6 +760,10 @@ struct miqt_string* QCborValueRef_ToDiagnosticNotation(QCborValueRef* self) {
return miqt_strdup(_b.data(), _b.length()); return miqt_strdup(_b.data(), _b.length());
} }
QCborTag QCborValueRef_Tag1(const QCborValueRef* self, QCborTag defaultValue) {
return self->tag(defaultValue);
}
QCborValue* QCborValueRef_TaggedValue1(const QCborValueRef* self, QCborValue* defaultValue) { QCborValue* QCborValueRef_TaggedValue1(const QCborValueRef* self, QCborValue* defaultValue) {
QCborValue _ret = self->taggedValue(*defaultValue); QCborValue _ret = self->taggedValue(*defaultValue);
// Copy-construct value returned type into heap-allocated copy // Copy-construct value returned type into heap-allocated copy

View File

@ -161,66 +161,96 @@ func NewQCborValue7(v float64) *QCborValue {
} }
// NewQCborValue8 constructs a new QCborValue object. // NewQCborValue8 constructs a new QCborValue object.
func NewQCborValue8(ba *QByteArray) *QCborValue { func NewQCborValue8(st QCborSimpleType) *QCborValue {
ret := C.QCborValue_new8(ba.cPointer()) ret := C.QCborValue_new8(st)
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue9 constructs a new QCborValue object. // NewQCborValue9 constructs a new QCborValue object.
func NewQCborValue9(s string) *QCborValue { func NewQCborValue9(ba *QByteArray) *QCborValue {
s_ms := miqt_strdupg(s) ret := C.QCborValue_new9(ba.cPointer())
defer C.free(s_ms)
ret := C.QCborValue_new9((*C.struct_miqt_string)(s_ms))
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue10 constructs a new QCborValue object. // NewQCborValue10 constructs a new QCborValue object.
func NewQCborValue10(s string) *QCborValue { func NewQCborValue10(s string) *QCborValue {
s_Cstring := C.CString(s) s_ms := miqt_strdupg(s)
defer C.free(unsafe.Pointer(s_Cstring)) defer C.free(s_ms)
ret := C.QCborValue_new10(s_Cstring) ret := C.QCborValue_new10((*C.struct_miqt_string)(s_ms))
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue11 constructs a new QCborValue object. // NewQCborValue11 constructs a new QCborValue object.
func NewQCborValue11(a *QCborArray) *QCborValue { func NewQCborValue11(s string) *QCborValue {
ret := C.QCborValue_new11(a.cPointer()) s_Cstring := C.CString(s)
defer C.free(unsafe.Pointer(s_Cstring))
ret := C.QCborValue_new11(s_Cstring)
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue12 constructs a new QCborValue object. // NewQCborValue12 constructs a new QCborValue object.
func NewQCborValue12(m *QCborMap) *QCborValue { func NewQCborValue12(a *QCborArray) *QCborValue {
ret := C.QCborValue_new12(m.cPointer()) ret := C.QCborValue_new12(a.cPointer())
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue13 constructs a new QCborValue object. // NewQCborValue13 constructs a new QCborValue object.
func NewQCborValue13(dt *QDateTime) *QCborValue { func NewQCborValue13(m *QCborMap) *QCborValue {
ret := C.QCborValue_new13(dt.cPointer()) ret := C.QCborValue_new13(m.cPointer())
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue14 constructs a new QCborValue object. // NewQCborValue14 constructs a new QCborValue object.
func NewQCborValue14(url *QUrl) *QCborValue { func NewQCborValue14(tag QCborTag) *QCborValue {
ret := C.QCborValue_new14(url.cPointer()) ret := C.QCborValue_new14(tag)
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue15 constructs a new QCborValue object. // NewQCborValue15 constructs a new QCborValue object.
func NewQCborValue15(rx *QRegularExpression) *QCborValue { func NewQCborValue15(t_ QCborKnownTags) *QCborValue {
ret := C.QCborValue_new15(rx.cPointer()) ret := C.QCborValue_new15(t_)
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue16 constructs a new QCborValue object. // NewQCborValue16 constructs a new QCborValue object.
func NewQCborValue16(uuid *QUuid) *QCborValue { func NewQCborValue16(dt *QDateTime) *QCborValue {
ret := C.QCborValue_new16(uuid.cPointer()) ret := C.QCborValue_new16(dt.cPointer())
return newQCborValue(ret) return newQCborValue(ret)
} }
// NewQCborValue17 constructs a new QCborValue object. // NewQCborValue17 constructs a new QCborValue object.
func NewQCborValue17(other *QCborValue) *QCborValue { func NewQCborValue17(url *QUrl) *QCborValue {
ret := C.QCborValue_new17(other.cPointer()) ret := C.QCborValue_new17(url.cPointer())
return newQCborValue(ret)
}
// NewQCborValue18 constructs a new QCborValue object.
func NewQCborValue18(rx *QRegularExpression) *QCborValue {
ret := C.QCborValue_new18(rx.cPointer())
return newQCborValue(ret)
}
// NewQCborValue19 constructs a new QCborValue object.
func NewQCborValue19(uuid *QUuid) *QCborValue {
ret := C.QCborValue_new19(uuid.cPointer())
return newQCborValue(ret)
}
// NewQCborValue20 constructs a new QCborValue object.
func NewQCborValue20(other *QCborValue) *QCborValue {
ret := C.QCborValue_new20(other.cPointer())
return newQCborValue(ret)
}
// NewQCborValue21 constructs a new QCborValue object.
func NewQCborValue21(tag QCborTag, taggedValue *QCborValue) *QCborValue {
ret := C.QCborValue_new21(tag, taggedValue.cPointer())
return newQCborValue(ret)
}
// NewQCborValue22 constructs a new QCborValue object.
func NewQCborValue22(t_ QCborKnownTags, tv *QCborValue) *QCborValue {
ret := C.QCborValue_new22(t_, tv.cPointer())
return newQCborValue(ret) return newQCborValue(ret)
} }
@ -332,6 +362,15 @@ func (this *QCborValue) IsSimpleType() bool {
return (bool)(_ret) return (bool)(_ret)
} }
func (this *QCborValue) IsSimpleTypeWithSt(st QCborSimpleType) bool {
_ret := C.QCborValue_IsSimpleTypeWithSt(this.h, st)
return (bool)(_ret)
}
func (this *QCborValue) ToSimpleType() QCborSimpleType {
return C.QCborValue_ToSimpleType(this.h)
}
func (this *QCborValue) ToInteger() int64 { func (this *QCborValue) ToInteger() int64 {
_ret := C.QCborValue_ToInteger(this.h) _ret := C.QCborValue_ToInteger(this.h)
return (int64)(_ret) return (int64)(_ret)
@ -347,6 +386,10 @@ func (this *QCborValue) ToDouble() float64 {
return (float64)(_ret) return (float64)(_ret)
} }
func (this *QCborValue) Tag() QCborTag {
return C.QCborValue_Tag(this.h)
}
func (this *QCborValue) TaggedValue() *QCborValue { func (this *QCborValue) TaggedValue() *QCborValue {
_ret := C.QCborValue_TaggedValue(this.h) _ret := C.QCborValue_TaggedValue(this.h)
_goptr := newQCborValue(_ret) _goptr := newQCborValue(_ret)
@ -552,6 +595,10 @@ func (this *QCborValue) ToDiagnosticNotation() string {
return _ret return _ret
} }
func (this *QCborValue) ToSimpleType1(defaultValue QCborSimpleType) QCborSimpleType {
return C.QCborValue_ToSimpleType1(this.h, defaultValue)
}
func (this *QCborValue) ToInteger1(defaultValue int64) int64 { func (this *QCborValue) ToInteger1(defaultValue int64) int64 {
_ret := C.QCborValue_ToInteger1(this.h, (C.longlong)(defaultValue)) _ret := C.QCborValue_ToInteger1(this.h, (C.longlong)(defaultValue))
return (int64)(_ret) return (int64)(_ret)
@ -567,6 +614,10 @@ func (this *QCborValue) ToDouble1(defaultValue float64) float64 {
return (float64)(_ret) return (float64)(_ret)
} }
func (this *QCborValue) Tag1(defaultValue QCborTag) QCborTag {
return C.QCborValue_Tag1(this.h, defaultValue)
}
func (this *QCborValue) TaggedValue1(defaultValue *QCborValue) *QCborValue { func (this *QCborValue) TaggedValue1(defaultValue *QCborValue) *QCborValue {
_ret := C.QCborValue_TaggedValue1(this.h, defaultValue.cPointer()) _ret := C.QCborValue_TaggedValue1(this.h, defaultValue.cPointer())
_goptr := newQCborValue(_ret) _goptr := newQCborValue(_ret)
@ -809,6 +860,15 @@ func (this *QCborValueRef) IsSimpleType() bool {
return (bool)(_ret) return (bool)(_ret)
} }
func (this *QCborValueRef) IsSimpleTypeWithSt(st QCborSimpleType) bool {
_ret := C.QCborValueRef_IsSimpleTypeWithSt(this.h, st)
return (bool)(_ret)
}
func (this *QCborValueRef) Tag() QCborTag {
return C.QCborValueRef_Tag(this.h)
}
func (this *QCborValueRef) TaggedValue() *QCborValue { func (this *QCborValueRef) TaggedValue() *QCborValue {
_ret := C.QCborValueRef_TaggedValue(this.h) _ret := C.QCborValueRef_TaggedValue(this.h)
_goptr := newQCborValue(_ret) _goptr := newQCborValue(_ret)
@ -985,6 +1045,10 @@ func (this *QCborValueRef) ToDiagnosticNotation() string {
return _ret return _ret
} }
func (this *QCborValueRef) Tag1(defaultValue QCborTag) QCborTag {
return C.QCborValueRef_Tag1(this.h, defaultValue)
}
func (this *QCborValueRef) TaggedValue1(defaultValue *QCborValue) *QCborValue { func (this *QCborValueRef) TaggedValue1(defaultValue *QCborValue) *QCborValue {
_ret := C.QCborValueRef_TaggedValue1(this.h, defaultValue.cPointer()) _ret := C.QCborValueRef_TaggedValue1(this.h, defaultValue.cPointer())
_goptr := newQCborValue(_ret) _goptr := newQCborValue(_ret)

View File

@ -55,16 +55,21 @@ QCborValue* QCborValue_new4(int i);
QCborValue* QCborValue_new5(unsigned int u); QCborValue* QCborValue_new5(unsigned int u);
QCborValue* QCborValue_new6(long long i); QCborValue* QCborValue_new6(long long i);
QCborValue* QCborValue_new7(double v); QCborValue* QCborValue_new7(double v);
QCborValue* QCborValue_new8(QByteArray* ba); QCborValue* QCborValue_new8(QCborSimpleType st);
QCborValue* QCborValue_new9(struct miqt_string* s); QCborValue* QCborValue_new9(QByteArray* ba);
QCborValue* QCborValue_new10(const char* s); QCborValue* QCborValue_new10(struct miqt_string* s);
QCborValue* QCborValue_new11(QCborArray* a); QCborValue* QCborValue_new11(const char* s);
QCborValue* QCborValue_new12(QCborMap* m); QCborValue* QCborValue_new12(QCborArray* a);
QCborValue* QCborValue_new13(QDateTime* dt); QCborValue* QCborValue_new13(QCborMap* m);
QCborValue* QCborValue_new14(QUrl* url); QCborValue* QCborValue_new14(QCborTag tag);
QCborValue* QCborValue_new15(QRegularExpression* rx); QCborValue* QCborValue_new15(QCborKnownTags t_);
QCborValue* QCborValue_new16(QUuid* uuid); QCborValue* QCborValue_new16(QDateTime* dt);
QCborValue* QCborValue_new17(QCborValue* other); QCborValue* QCborValue_new17(QUrl* url);
QCborValue* QCborValue_new18(QRegularExpression* rx);
QCborValue* QCborValue_new19(QUuid* uuid);
QCborValue* QCborValue_new20(QCborValue* other);
QCborValue* QCborValue_new21(QCborTag tag, QCborValue* taggedValue);
QCborValue* QCborValue_new22(QCborKnownTags t_, QCborValue* tv);
void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other); void QCborValue_OperatorAssign(QCborValue* self, QCborValue* other);
void QCborValue_Swap(QCborValue* self, QCborValue* other); void QCborValue_Swap(QCborValue* self, QCborValue* other);
uintptr_t QCborValue_Type(const QCborValue* self); uintptr_t QCborValue_Type(const QCborValue* self);
@ -87,9 +92,12 @@ bool QCborValue_IsUuid(const QCborValue* self);
bool QCborValue_IsInvalid(const QCborValue* self); bool QCborValue_IsInvalid(const QCborValue* self);
bool QCborValue_IsContainer(const QCborValue* self); bool QCborValue_IsContainer(const QCborValue* self);
bool QCborValue_IsSimpleType(const QCborValue* self); bool QCborValue_IsSimpleType(const QCborValue* self);
bool QCborValue_IsSimpleTypeWithSt(const QCborValue* self, QCborSimpleType st);
QCborSimpleType QCborValue_ToSimpleType(const QCborValue* self);
long long QCborValue_ToInteger(const QCborValue* self); long long QCborValue_ToInteger(const QCborValue* self);
bool QCborValue_ToBool(const QCborValue* self); bool QCborValue_ToBool(const QCborValue* self);
double QCborValue_ToDouble(const QCborValue* self); double QCborValue_ToDouble(const QCborValue* self);
QCborTag QCborValue_Tag(const QCborValue* self);
QCborValue* QCborValue_TaggedValue(const QCborValue* self); QCborValue* QCborValue_TaggedValue(const QCborValue* self);
QByteArray* QCborValue_ToByteArray(const QCborValue* self); QByteArray* QCborValue_ToByteArray(const QCborValue* self);
struct miqt_string* QCborValue_ToString(const QCborValue* self); struct miqt_string* QCborValue_ToString(const QCborValue* self);
@ -120,9 +128,11 @@ QCborValue* QCborValue_FromCbor3(const unsigned char* data, size_t lenVal);
QByteArray* QCborValue_ToCbor(QCborValue* self); QByteArray* QCborValue_ToCbor(QCborValue* self);
void QCborValue_ToCborWithWriter(QCborValue* self, QCborStreamWriter* writer); void QCborValue_ToCborWithWriter(QCborValue* self, QCborStreamWriter* writer);
struct miqt_string* QCborValue_ToDiagnosticNotation(const QCborValue* self); struct miqt_string* QCborValue_ToDiagnosticNotation(const QCborValue* self);
QCborSimpleType QCborValue_ToSimpleType1(const QCborValue* self, QCborSimpleType defaultValue);
long long QCborValue_ToInteger1(const QCborValue* self, long long defaultValue); long long QCborValue_ToInteger1(const QCborValue* self, long long defaultValue);
bool QCborValue_ToBool1(const QCborValue* self, bool defaultValue); bool QCborValue_ToBool1(const QCborValue* self, bool defaultValue);
double QCborValue_ToDouble1(const QCborValue* self, double defaultValue); double QCborValue_ToDouble1(const QCborValue* self, double defaultValue);
QCborTag QCborValue_Tag1(const QCborValue* self, QCborTag defaultValue);
QCborValue* QCborValue_TaggedValue1(const QCborValue* self, QCborValue* defaultValue); QCborValue* QCborValue_TaggedValue1(const QCborValue* self, QCborValue* defaultValue);
QByteArray* QCborValue_ToByteArray1(const QCborValue* self, QByteArray* defaultValue); QByteArray* QCborValue_ToByteArray1(const QCborValue* self, QByteArray* defaultValue);
struct miqt_string* QCborValue_ToString1(const QCborValue* self, struct miqt_string* defaultValue); struct miqt_string* QCborValue_ToString1(const QCborValue* self, struct miqt_string* defaultValue);
@ -161,6 +171,8 @@ bool QCborValueRef_IsUuid(const QCborValueRef* self);
bool QCborValueRef_IsInvalid(const QCborValueRef* self); bool QCborValueRef_IsInvalid(const QCborValueRef* self);
bool QCborValueRef_IsContainer(const QCborValueRef* self); bool QCborValueRef_IsContainer(const QCborValueRef* self);
bool QCborValueRef_IsSimpleType(const QCborValueRef* self); bool QCborValueRef_IsSimpleType(const QCborValueRef* self);
bool QCborValueRef_IsSimpleTypeWithSt(const QCborValueRef* self, QCborSimpleType st);
QCborTag QCborValueRef_Tag(const QCborValueRef* self);
QCborValue* QCborValueRef_TaggedValue(const QCborValueRef* self); QCborValue* QCborValueRef_TaggedValue(const QCborValueRef* self);
long long QCborValueRef_ToInteger(const QCborValueRef* self); long long QCborValueRef_ToInteger(const QCborValueRef* self);
bool QCborValueRef_ToBool(const QCborValueRef* self); bool QCborValueRef_ToBool(const QCborValueRef* self);
@ -188,6 +200,7 @@ QJsonValue* QCborValueRef_ToJsonValue(const QCborValueRef* self);
QByteArray* QCborValueRef_ToCbor(QCborValueRef* self); QByteArray* QCborValueRef_ToCbor(QCborValueRef* self);
void QCborValueRef_ToCborWithWriter(QCborValueRef* self, QCborStreamWriter* writer); void QCborValueRef_ToCborWithWriter(QCborValueRef* self, QCborStreamWriter* writer);
struct miqt_string* QCborValueRef_ToDiagnosticNotation(QCborValueRef* self); struct miqt_string* QCborValueRef_ToDiagnosticNotation(QCborValueRef* self);
QCborTag QCborValueRef_Tag1(const QCborValueRef* self, QCborTag defaultValue);
QCborValue* QCborValueRef_TaggedValue1(const QCborValueRef* self, QCborValue* defaultValue); QCborValue* QCborValueRef_TaggedValue1(const QCborValueRef* self, QCborValue* defaultValue);
long long QCborValueRef_ToInteger1(const QCborValueRef* self, long long defaultValue); long long QCborValueRef_ToInteger1(const QCborValueRef* self, long long defaultValue);
bool QCborValueRef_ToBool1(const QCborValueRef* self, bool defaultValue); bool QCborValueRef_ToBool1(const QCborValueRef* self, bool defaultValue);

View File

@ -20,7 +20,7 @@ const (
QDate__MonthNameType__StandaloneFormat QDate__MonthNameType = 1 QDate__MonthNameType__StandaloneFormat QDate__MonthNameType = 1
) )
type QDateTime__YearRange int type QDateTime__YearRange int32
const ( const (
QDateTime__YearRange__First QDateTime__YearRange = -292275056 QDateTime__YearRange__First QDateTime__YearRange = -292275056

View File

@ -7,3 +7,5 @@ package qt
*/ */
import "C" import "C"
type QtPrivate__Deprecated_t int