2024-10-20 05:21:03 +00:00
|
|
|
package qt6
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
#include "gen_qcompare.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
*/
|
|
|
|
import "C"
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
type QtPrivate__Ordering int8
|
|
|
|
|
|
|
|
const (
|
|
|
|
QtPrivate__Equal QtPrivate__Ordering = 0
|
|
|
|
QtPrivate__Equivalent QtPrivate__Ordering = 0
|
|
|
|
QtPrivate__Less QtPrivate__Ordering = -1
|
|
|
|
QtPrivate__Greater QtPrivate__Ordering = 1
|
|
|
|
)
|
|
|
|
|
|
|
|
type QtPrivate__Uncomparable int8
|
|
|
|
|
|
|
|
const (
|
|
|
|
QtPrivate__Unordered QtPrivate__Uncomparable = -127
|
|
|
|
)
|
|
|
|
|
|
|
|
type QPartialOrdering struct {
|
2024-11-19 06:29:06 +00:00
|
|
|
h *C.QPartialOrdering
|
|
|
|
isSubclass bool
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPartialOrdering) cPointer() *C.QPartialOrdering {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return this.h
|
|
|
|
}
|
|
|
|
|
|
|
|
func (this *QPartialOrdering) UnsafePointer() unsafe.Pointer {
|
|
|
|
if this == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return unsafe.Pointer(this.h)
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// newQPartialOrdering constructs the type using only CGO pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func newQPartialOrdering(h *C.QPartialOrdering) *QPartialOrdering {
|
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return &QPartialOrdering{h: h}
|
|
|
|
}
|
|
|
|
|
2024-11-19 06:29:06 +00:00
|
|
|
// UnsafeNewQPartialOrdering constructs the type using only unsafe pointers.
|
2024-10-20 05:21:03 +00:00
|
|
|
func UnsafeNewQPartialOrdering(h unsafe.Pointer) *QPartialOrdering {
|
2024-11-19 06:29:06 +00:00
|
|
|
if h == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return &QPartialOrdering{h: (*C.QPartialOrdering)(h)}
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewQPartialOrdering constructs a new QPartialOrdering object.
|
|
|
|
func NewQPartialOrdering(param1 *QPartialOrdering) *QPartialOrdering {
|
2024-11-19 06:29:06 +00:00
|
|
|
var outptr_QPartialOrdering *C.QPartialOrdering = nil
|
|
|
|
|
|
|
|
C.QPartialOrdering_new(param1.cPointer(), &outptr_QPartialOrdering)
|
|
|
|
ret := newQPartialOrdering(outptr_QPartialOrdering)
|
|
|
|
ret.isSubclass = true
|
|
|
|
return ret
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Delete this object from C++ memory.
|
|
|
|
func (this *QPartialOrdering) Delete() {
|
2024-11-19 06:29:06 +00:00
|
|
|
C.QPartialOrdering_Delete(this.h, C.bool(this.isSubclass))
|
2024-10-20 05:21:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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 *QPartialOrdering) GoGC() {
|
|
|
|
runtime.SetFinalizer(this, func(this *QPartialOrdering) {
|
|
|
|
this.Delete()
|
|
|
|
runtime.KeepAlive(this.h)
|
|
|
|
})
|
|
|
|
}
|