package qt /* #include "gen_qcborstreamreader.h" #include */ import "C" import ( "runtime" "unsafe" ) type QCborStreamReader__Type byte const ( QCborStreamReader__Type__UnsignedInteger QCborStreamReader__Type = 0 QCborStreamReader__Type__NegativeInteger QCborStreamReader__Type = 32 QCborStreamReader__Type__ByteString QCborStreamReader__Type = 64 QCborStreamReader__Type__ByteArray QCborStreamReader__Type = 64 QCborStreamReader__Type__TextString QCborStreamReader__Type = 96 QCborStreamReader__Type__String QCborStreamReader__Type = 96 QCborStreamReader__Type__Array QCborStreamReader__Type = 128 QCborStreamReader__Type__Map QCborStreamReader__Type = 160 QCborStreamReader__Type__Tag QCborStreamReader__Type = 192 QCborStreamReader__Type__SimpleType QCborStreamReader__Type = 224 QCborStreamReader__Type__HalfFloat QCborStreamReader__Type = 249 QCborStreamReader__Type__Float16 QCborStreamReader__Type = 249 QCborStreamReader__Type__Float QCborStreamReader__Type = 250 QCborStreamReader__Type__Double QCborStreamReader__Type = 251 QCborStreamReader__Type__Invalid QCborStreamReader__Type = 255 ) type QCborStreamReader__StringResultCode int const ( QCborStreamReader__StringResultCode__EndOfString QCborStreamReader__StringResultCode = 0 QCborStreamReader__StringResultCode__Ok QCborStreamReader__StringResultCode = 1 QCborStreamReader__StringResultCode__Error QCborStreamReader__StringResultCode = -1 ) type QCborStreamReader struct { h *C.QCborStreamReader } func (this *QCborStreamReader) cPointer() *C.QCborStreamReader { if this == nil { return nil } return this.h } func newQCborStreamReader(h *C.QCborStreamReader) *QCborStreamReader { if h == nil { return nil } return &QCborStreamReader{h: h} } func newQCborStreamReader_U(h unsafe.Pointer) *QCborStreamReader { return newQCborStreamReader((*C.QCborStreamReader)(h)) } // NewQCborStreamReader constructs a new QCborStreamReader object. func NewQCborStreamReader() *QCborStreamReader { ret := C.QCborStreamReader_new() return newQCborStreamReader(ret) } // NewQCborStreamReader2 constructs a new QCborStreamReader object. func NewQCborStreamReader2(data string, lenVal uint64) *QCborStreamReader { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) ret := C.QCborStreamReader_new2(data_Cstring, (C.size_t)(lenVal)) return newQCborStreamReader(ret) } // NewQCborStreamReader3 constructs a new QCborStreamReader object. func NewQCborStreamReader3(data *byte, lenVal uint64) *QCborStreamReader { ret := C.QCborStreamReader_new3((*C.uchar)(unsafe.Pointer(data)), (C.size_t)(lenVal)) return newQCborStreamReader(ret) } // NewQCborStreamReader4 constructs a new QCborStreamReader object. func NewQCborStreamReader4(data *QByteArray) *QCborStreamReader { ret := C.QCborStreamReader_new4(data.cPointer()) return newQCborStreamReader(ret) } // NewQCborStreamReader5 constructs a new QCborStreamReader object. func NewQCborStreamReader5(device *QIODevice) *QCborStreamReader { ret := C.QCborStreamReader_new5(device.cPointer()) return newQCborStreamReader(ret) } func (this *QCborStreamReader) SetDevice(device *QIODevice) { C.QCborStreamReader_SetDevice(this.h, device.cPointer()) } func (this *QCborStreamReader) Device() *QIODevice { return newQIODevice_U(unsafe.Pointer(C.QCborStreamReader_Device(this.h))) } func (this *QCborStreamReader) AddData(data *QByteArray) { C.QCborStreamReader_AddData(this.h, data.cPointer()) } func (this *QCborStreamReader) AddData2(data string, lenVal uint64) { data_Cstring := C.CString(data) defer C.free(unsafe.Pointer(data_Cstring)) C.QCborStreamReader_AddData2(this.h, data_Cstring, (C.size_t)(lenVal)) } func (this *QCborStreamReader) AddData3(data *byte, lenVal uint64) { C.QCborStreamReader_AddData3(this.h, (*C.uchar)(unsafe.Pointer(data)), (C.size_t)(lenVal)) } func (this *QCborStreamReader) Reparse() { C.QCborStreamReader_Reparse(this.h) } func (this *QCborStreamReader) Clear() { C.QCborStreamReader_Clear(this.h) } func (this *QCborStreamReader) Reset() { C.QCborStreamReader_Reset(this.h) } func (this *QCborStreamReader) LastError() *QCborError { _ret := C.QCborStreamReader_LastError(this.h) _goptr := newQCborError(_ret) _goptr.GoGC() // Qt uses pass-by-value semantics for this type. Mimic with finalizer return _goptr } func (this *QCborStreamReader) CurrentOffset() int64 { return (int64)(C.QCborStreamReader_CurrentOffset(this.h)) } func (this *QCborStreamReader) IsValid() bool { return (bool)(C.QCborStreamReader_IsValid(this.h)) } func (this *QCborStreamReader) ContainerDepth() int { return (int)(C.QCborStreamReader_ContainerDepth(this.h)) } func (this *QCborStreamReader) ParentContainerType() QCborStreamReader__Type { return (QCborStreamReader__Type)(C.QCborStreamReader_ParentContainerType(this.h)) } func (this *QCborStreamReader) HasNext() bool { return (bool)(C.QCborStreamReader_HasNext(this.h)) } func (this *QCborStreamReader) Next() bool { return (bool)(C.QCborStreamReader_Next(this.h)) } func (this *QCborStreamReader) Type() QCborStreamReader__Type { return (QCborStreamReader__Type)(C.QCborStreamReader_Type(this.h)) } func (this *QCborStreamReader) IsUnsignedInteger() bool { return (bool)(C.QCborStreamReader_IsUnsignedInteger(this.h)) } func (this *QCborStreamReader) IsNegativeInteger() bool { return (bool)(C.QCborStreamReader_IsNegativeInteger(this.h)) } func (this *QCborStreamReader) IsInteger() bool { return (bool)(C.QCborStreamReader_IsInteger(this.h)) } func (this *QCborStreamReader) IsByteArray() bool { return (bool)(C.QCborStreamReader_IsByteArray(this.h)) } func (this *QCborStreamReader) IsString() bool { return (bool)(C.QCborStreamReader_IsString(this.h)) } func (this *QCborStreamReader) IsArray() bool { return (bool)(C.QCborStreamReader_IsArray(this.h)) } func (this *QCborStreamReader) IsMap() bool { return (bool)(C.QCborStreamReader_IsMap(this.h)) } func (this *QCborStreamReader) IsTag() bool { return (bool)(C.QCborStreamReader_IsTag(this.h)) } func (this *QCborStreamReader) IsSimpleType() bool { return (bool)(C.QCborStreamReader_IsSimpleType(this.h)) } func (this *QCborStreamReader) IsFloat16() bool { return (bool)(C.QCborStreamReader_IsFloat16(this.h)) } func (this *QCborStreamReader) IsFloat() bool { return (bool)(C.QCborStreamReader_IsFloat(this.h)) } func (this *QCborStreamReader) IsDouble() bool { return (bool)(C.QCborStreamReader_IsDouble(this.h)) } func (this *QCborStreamReader) IsInvalid() bool { return (bool)(C.QCborStreamReader_IsInvalid(this.h)) } func (this *QCborStreamReader) IsSimpleTypeWithSt(st QCborSimpleType) bool { return (bool)(C.QCborStreamReader_IsSimpleTypeWithSt(this.h, st)) } func (this *QCborStreamReader) IsFalse() bool { return (bool)(C.QCborStreamReader_IsFalse(this.h)) } func (this *QCborStreamReader) IsTrue() bool { return (bool)(C.QCborStreamReader_IsTrue(this.h)) } func (this *QCborStreamReader) IsBool() bool { return (bool)(C.QCborStreamReader_IsBool(this.h)) } func (this *QCborStreamReader) IsNull() bool { return (bool)(C.QCborStreamReader_IsNull(this.h)) } func (this *QCborStreamReader) IsUndefined() bool { return (bool)(C.QCborStreamReader_IsUndefined(this.h)) } func (this *QCborStreamReader) IsLengthKnown() bool { return (bool)(C.QCborStreamReader_IsLengthKnown(this.h)) } func (this *QCborStreamReader) Length() uint64 { return (uint64)(C.QCborStreamReader_Length(this.h)) } func (this *QCborStreamReader) IsContainer() bool { return (bool)(C.QCborStreamReader_IsContainer(this.h)) } func (this *QCborStreamReader) EnterContainer() bool { return (bool)(C.QCborStreamReader_EnterContainer(this.h)) } func (this *QCborStreamReader) LeaveContainer() bool { return (bool)(C.QCborStreamReader_LeaveContainer(this.h)) } func (this *QCborStreamReader) CurrentStringChunkSize() uint64 { return (uint64)(C.QCborStreamReader_CurrentStringChunkSize(this.h)) } func (this *QCborStreamReader) ToBool() bool { return (bool)(C.QCborStreamReader_ToBool(this.h)) } func (this *QCborStreamReader) ToTag() QCborTag { return C.QCborStreamReader_ToTag(this.h) } func (this *QCborStreamReader) ToUnsignedInteger() uint64 { return (uint64)(C.QCborStreamReader_ToUnsignedInteger(this.h)) } 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 { return (float32)(C.QCborStreamReader_ToFloat(this.h)) } func (this *QCborStreamReader) ToDouble() float64 { return (float64)(C.QCborStreamReader_ToDouble(this.h)) } func (this *QCborStreamReader) ToInteger() int64 { return (int64)(C.QCborStreamReader_ToInteger(this.h)) } func (this *QCborStreamReader) Next1(maxRecursion int) bool { return (bool)(C.QCborStreamReader_Next1(this.h, (C.int)(maxRecursion))) } // Delete this object from C++ memory. func (this *QCborStreamReader) Delete() { C.QCborStreamReader_Delete(this.h) } // GoGC adds a Go Finalizer to this pointer, so that it will be deleted // from C++ memory once it is unreachable from Go memory. func (this *QCborStreamReader) GoGC() { runtime.SetFinalizer(this, func(this *QCborStreamReader) { this.Delete() runtime.KeepAlive(this.h) }) }