forked from therecipe/qt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qxmlcontenthandler.go
executable file
·176 lines (138 loc) · 4.77 KB
/
qxmlcontenthandler.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
package xml
//#include "xml.h"
import "C"
import (
"github.com/therecipe/qt"
"unsafe"
)
type QXmlContentHandler struct {
ptr unsafe.Pointer
}
type QXmlContentHandler_ITF interface {
QXmlContentHandler_PTR() *QXmlContentHandler
}
func (p *QXmlContentHandler) Pointer() unsafe.Pointer {
return p.ptr
}
func (p *QXmlContentHandler) SetPointer(ptr unsafe.Pointer) {
p.ptr = ptr
}
func PointerFromQXmlContentHandler(ptr QXmlContentHandler_ITF) unsafe.Pointer {
if ptr != nil {
return ptr.QXmlContentHandler_PTR().Pointer()
}
return nil
}
func NewQXmlContentHandlerFromPointer(ptr unsafe.Pointer) *QXmlContentHandler {
var n = new(QXmlContentHandler)
n.SetPointer(ptr)
for len(n.ObjectNameAbs()) < len("QXmlContentHandler_") {
n.SetObjectNameAbs("QXmlContentHandler_" + qt.Identifier())
}
return n
}
func (ptr *QXmlContentHandler) QXmlContentHandler_PTR() *QXmlContentHandler {
return ptr
}
func (ptr *QXmlContentHandler) Characters(ch string) bool {
defer qt.Recovering("QXmlContentHandler::characters")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_Characters(ptr.Pointer(), C.CString(ch)) != 0
}
return false
}
func (ptr *QXmlContentHandler) EndDocument() bool {
defer qt.Recovering("QXmlContentHandler::endDocument")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_EndDocument(ptr.Pointer()) != 0
}
return false
}
func (ptr *QXmlContentHandler) EndElement(namespaceURI string, localName string, qName string) bool {
defer qt.Recovering("QXmlContentHandler::endElement")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_EndElement(ptr.Pointer(), C.CString(namespaceURI), C.CString(localName), C.CString(qName)) != 0
}
return false
}
func (ptr *QXmlContentHandler) EndPrefixMapping(prefix string) bool {
defer qt.Recovering("QXmlContentHandler::endPrefixMapping")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_EndPrefixMapping(ptr.Pointer(), C.CString(prefix)) != 0
}
return false
}
func (ptr *QXmlContentHandler) ErrorString() string {
defer qt.Recovering("QXmlContentHandler::errorString")
if ptr.Pointer() != nil {
return C.GoString(C.QXmlContentHandler_ErrorString(ptr.Pointer()))
}
return ""
}
func (ptr *QXmlContentHandler) IgnorableWhitespace(ch string) bool {
defer qt.Recovering("QXmlContentHandler::ignorableWhitespace")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_IgnorableWhitespace(ptr.Pointer(), C.CString(ch)) != 0
}
return false
}
func (ptr *QXmlContentHandler) ProcessingInstruction(target string, data string) bool {
defer qt.Recovering("QXmlContentHandler::processingInstruction")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_ProcessingInstruction(ptr.Pointer(), C.CString(target), C.CString(data)) != 0
}
return false
}
func (ptr *QXmlContentHandler) SetDocumentLocator(locator QXmlLocator_ITF) {
defer qt.Recovering("QXmlContentHandler::setDocumentLocator")
if ptr.Pointer() != nil {
C.QXmlContentHandler_SetDocumentLocator(ptr.Pointer(), PointerFromQXmlLocator(locator))
}
}
func (ptr *QXmlContentHandler) SkippedEntity(name string) bool {
defer qt.Recovering("QXmlContentHandler::skippedEntity")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_SkippedEntity(ptr.Pointer(), C.CString(name)) != 0
}
return false
}
func (ptr *QXmlContentHandler) StartDocument() bool {
defer qt.Recovering("QXmlContentHandler::startDocument")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_StartDocument(ptr.Pointer()) != 0
}
return false
}
func (ptr *QXmlContentHandler) StartElement(namespaceURI string, localName string, qName string, atts QXmlAttributes_ITF) bool {
defer qt.Recovering("QXmlContentHandler::startElement")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_StartElement(ptr.Pointer(), C.CString(namespaceURI), C.CString(localName), C.CString(qName), PointerFromQXmlAttributes(atts)) != 0
}
return false
}
func (ptr *QXmlContentHandler) StartPrefixMapping(prefix string, uri string) bool {
defer qt.Recovering("QXmlContentHandler::startPrefixMapping")
if ptr.Pointer() != nil {
return C.QXmlContentHandler_StartPrefixMapping(ptr.Pointer(), C.CString(prefix), C.CString(uri)) != 0
}
return false
}
func (ptr *QXmlContentHandler) DestroyQXmlContentHandler() {
defer qt.Recovering("QXmlContentHandler::~QXmlContentHandler")
if ptr.Pointer() != nil {
C.QXmlContentHandler_DestroyQXmlContentHandler(ptr.Pointer())
}
}
func (ptr *QXmlContentHandler) ObjectNameAbs() string {
defer qt.Recovering("QXmlContentHandler::objectNameAbs")
if ptr.Pointer() != nil {
return C.GoString(C.QXmlContentHandler_ObjectNameAbs(ptr.Pointer()))
}
return ""
}
func (ptr *QXmlContentHandler) SetObjectNameAbs(name string) {
defer qt.Recovering("QXmlContentHandler::setObjectNameAbs")
if ptr.Pointer() != nil {
C.QXmlContentHandler_SetObjectNameAbs(ptr.Pointer(), C.CString(name))
}
}