PythonQtWrapper_QXmlSerializer.cpp
326 lines
| 12.1 KiB
| text/x-c
|
CppLexer
|
r13 | #include "PythonQtWrapper_QXmlSerializer.h" | ||
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
|
r13 | #include <QVariant> | ||
#include <qabstractxmlnodemodel.h> | ||||
#include <qabstractxmlreceiver.h> | ||||
#include <qiodevice.h> | ||||
#include <qtextcodec.h> | ||||
#include <qxmlname.h> | ||||
#include <qxmlquery.h> | ||||
|
r24 | void PythonQtShell_QXmlSerializer::atomicValue(const QVariant& value) | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "atomicValue"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"atomicValue(QXmlSerializer*,const QVariant& )"); | ||||
void* args[2] = {NULL, (void*)&value}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::atomicValue(value); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::attribute(const QXmlName& name, const QStringRef& value) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "attribute"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"attribute(QXmlSerializer*,const QXmlName& ,const QStringRef& )"); | ||||
void* args[3] = {NULL, (void*)&name, (void*)&value}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::attribute(name, value); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::characters(const QStringRef& value) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "characters"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"characters(QXmlSerializer*,const QStringRef& )"); | ||||
void* args[2] = {NULL, (void*)&value}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::characters(value); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::comment(const QString& value) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "comment"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"comment(QXmlSerializer*,const QString& )"); | ||||
void* args[2] = {NULL, (void*)&value}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::comment(value); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::endDocument() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "endDocument"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"endDocument(QXmlSerializer*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::endDocument(); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::endElement() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "endElement"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"endElement(QXmlSerializer*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::endElement(); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::endOfSequence() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "endOfSequence"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"endOfSequence(QXmlSerializer*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::endOfSequence(); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::namespaceBinding(const QXmlName& nb) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "namespaceBinding"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"namespaceBinding(QXmlSerializer*,const QXmlName& )"); | ||||
void* args[2] = {NULL, (void*)&nb}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::namespaceBinding(nb); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::processingInstruction(const QXmlName& name, const QString& value) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "processingInstruction"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"processingInstruction(QXmlSerializer*,const QXmlName& ,const QString& )"); | ||||
void* args[3] = {NULL, (void*)&name, (void*)&value}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::processingInstruction(name, value); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::startDocument() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "startDocument"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"startDocument(QXmlSerializer*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::startDocument(); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::startElement(const QXmlName& name) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "startElement"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"startElement(QXmlSerializer*,const QXmlName& )"); | ||||
void* args[2] = {NULL, (void*)&name}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::startElement(name); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::startOfSequence() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "startOfSequence"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"startOfSequence(QXmlSerializer*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::startOfSequence(); | ||||
} | ||||
void PythonQtShell_QXmlSerializer::whitespaceOnly(const QStringRef& value) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "whitespaceOnly"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlSerializer::staticMetaObject, | ||||
"whitespaceOnly(QXmlSerializer*,const QStringRef& )"); | ||||
void* args[2] = {NULL, (void*)&value}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlSerializer::whitespaceOnly(value); | ||||
} | ||||
|
r13 | QXmlSerializer* PythonQtWrapper_QXmlSerializer::new_QXmlSerializer(const QXmlQuery& query, QIODevice* outputDevice) | ||
{ | ||||
|
r24 | return new PythonQtShell_QXmlSerializer(query, outputDevice); } | ||
|
r13 | |||
|
r28 | void PythonQtWrapper_QXmlSerializer::atomicValue(QXmlSerializer* theWrappedObject, const QVariant& value) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_atomicValue(value); | ||
|
r13 | } | ||
|
r28 | const QTextCodec* PythonQtWrapper_QXmlSerializer::codec(QXmlSerializer* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->codec(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::namespaceBinding(QXmlSerializer* theWrappedObject, const QXmlName& nb) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_namespaceBinding(nb); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::attribute(QXmlSerializer* theWrappedObject, const QXmlName& name, const QStringRef& value) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_attribute(name, value); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::characters(QXmlSerializer* theWrappedObject, const QStringRef& value) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_characters(value); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::startDocument(QXmlSerializer* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_startDocument(); | ||
|
r13 | } | ||
|
r28 | QIODevice* PythonQtWrapper_QXmlSerializer::outputDevice(QXmlSerializer* theWrappedObject) const | ||
|
r13 | { | ||
|
r28 | return theWrappedObject->outputDevice(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::setCodec(QXmlSerializer* theWrappedObject, const QTextCodec* codec) | ||
|
r13 | { | ||
|
r28 | theWrappedObject->setCodec(codec); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::startElement(QXmlSerializer* theWrappedObject, const QXmlName& name) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_startElement(name); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::endDocument(QXmlSerializer* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_endDocument(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::comment(QXmlSerializer* theWrappedObject, const QString& value) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_comment(value); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::processingInstruction(QXmlSerializer* theWrappedObject, const QXmlName& name, const QString& value) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_processingInstruction(name, value); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::endElement(QXmlSerializer* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_endElement(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::endOfSequence(QXmlSerializer* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_endOfSequence(); | ||
|
r13 | } | ||
|
r28 | void PythonQtWrapper_QXmlSerializer::startOfSequence(QXmlSerializer* theWrappedObject) | ||
|
r13 | { | ||
|
r28 | ((PythonQtPublicPromoter_QXmlSerializer*)theWrappedObject)->promoted_startOfSequence(); | ||
|
r13 | } | ||