miqt/qt6/gen_qexception.go

77 lines
1.8 KiB
Go
Raw Normal View History

2024-10-20 05:21:03 +00:00
package qt6
/*
#include "gen_qexception.h"
#include <stdlib.h>
*/
import "C"
import (
"runtime"
"unsafe"
)
type QtPrivate__ExceptionStore struct {
2024-11-19 06:29:06 +00:00
h *C.QtPrivate__ExceptionStore
isSubclass bool
2024-10-20 05:21:03 +00:00
}
func (this *QtPrivate__ExceptionStore) cPointer() *C.QtPrivate__ExceptionStore {
if this == nil {
return nil
}
return this.h
}
func (this *QtPrivate__ExceptionStore) UnsafePointer() unsafe.Pointer {
if this == nil {
return nil
}
return unsafe.Pointer(this.h)
}
2024-11-19 06:29:06 +00:00
// newQtPrivate__ExceptionStore constructs the type using only CGO pointers.
2024-10-20 05:21:03 +00:00
func newQtPrivate__ExceptionStore(h *C.QtPrivate__ExceptionStore) *QtPrivate__ExceptionStore {
if h == nil {
return nil
}
return &QtPrivate__ExceptionStore{h: h}
}
2024-11-19 06:29:06 +00:00
// UnsafeNewQtPrivate__ExceptionStore constructs the type using only unsafe pointers.
2024-10-20 05:21:03 +00:00
func UnsafeNewQtPrivate__ExceptionStore(h unsafe.Pointer) *QtPrivate__ExceptionStore {
2024-11-19 06:29:06 +00:00
if h == nil {
return nil
}
return &QtPrivate__ExceptionStore{h: (*C.QtPrivate__ExceptionStore)(h)}
2024-10-20 05:21:03 +00:00
}
func (this *QtPrivate__ExceptionStore) HasException() bool {
return (bool)(C.QtPrivate__ExceptionStore_HasException(this.h))
}
func (this *QtPrivate__ExceptionStore) ThrowPossibleException() {
C.QtPrivate__ExceptionStore_ThrowPossibleException(this.h)
}
func (this *QtPrivate__ExceptionStore) RethrowException() {
C.QtPrivate__ExceptionStore_RethrowException(this.h)
}
// Delete this object from C++ memory.
func (this *QtPrivate__ExceptionStore) Delete() {
2024-11-19 06:29:06 +00:00
C.QtPrivate__ExceptionStore_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 *QtPrivate__ExceptionStore) GoGC() {
runtime.SetFinalizer(this, func(this *QtPrivate__ExceptionStore) {
this.Delete()
runtime.KeepAlive(this.h)
})
}