PythonQtWrapper_QXmlInputSource.cpp
199 lines
| 7.1 KiB
| text/x-c
|
CppLexer
florianlink
|
r13 | #include "PythonQtWrapper_QXmlInputSource.h" | ||
florianlink
|
r24 | #include <PythonQtSignalReceiver.h> | ||
#include <PythonQtMethodInfo.h> | ||||
#include <PythonQtConversion.h> | ||||
florianlink
|
r13 | #include <QVariant> | ||
#include <qbytearray.h> | ||||
#include <qiodevice.h> | ||||
florianlink
|
r24 | QString PythonQtShell_QXmlInputSource::data() const | ||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "data"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlInputSource::staticMetaObject, | ||||
"data(QXmlInputSource*)"); | ||||
QString returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((QString *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QXmlInputSource::data(); | ||||
} | ||||
void PythonQtShell_QXmlInputSource::fetchData() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "fetchData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlInputSource::staticMetaObject, | ||||
"fetchData(QXmlInputSource*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlInputSource::fetchData(); | ||||
} | ||||
QString PythonQtShell_QXmlInputSource::fromRawData(const QByteArray& data, bool beginning) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "fromRawData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlInputSource::staticMetaObject, | ||||
"fromRawData(QXmlInputSource*,const QByteArray& ,bool )"); | ||||
QString returnValue; | ||||
void* args[3] = {NULL, (void*)&data, (void*)&beginning}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((QString *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QXmlInputSource::fromRawData(data, beginning); | ||||
} | ||||
QChar PythonQtShell_QXmlInputSource::next() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "next"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlInputSource::staticMetaObject, | ||||
"next(QXmlInputSource*)"); | ||||
QChar returnValue; | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { | ||||
args[0] = PythonQtConv::ConvertPythonToQt(methodInfo->parameters().at(0), result, false, NULL, &returnValue); | ||||
if (args[0]!=&returnValue) { | ||||
returnValue = *((QChar *)args[0]); | ||||
} | ||||
} | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return returnValue; | ||||
} | ||||
} | ||||
return QXmlInputSource::next(); | ||||
} | ||||
void PythonQtShell_QXmlInputSource::reset() | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "reset"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlInputSource::staticMetaObject, | ||||
"reset(QXmlInputSource*)"); | ||||
void* args[1] = {NULL}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlInputSource::reset(); | ||||
} | ||||
void PythonQtShell_QXmlInputSource::setData(const QByteArray& dat) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlInputSource::staticMetaObject, | ||||
"setData(QXmlInputSource*,const QByteArray& )"); | ||||
void* args[2] = {NULL, (void*)&dat}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlInputSource::setData(dat); | ||||
} | ||||
void PythonQtShell_QXmlInputSource::setData(const QString& dat) | ||||
{ | ||||
if (_wrapper) { | ||||
PyObject* obj = PyObject_GetAttrString((PyObject*)_wrapper, "setData"); | ||||
PyErr_Clear(); | ||||
if (obj && !PythonQtSlotFunction_Check(obj)) { | ||||
static const PythonQtMethodInfo* methodInfo = PythonQtMethodInfo::getCachedMethodInfoFromMetaObjectAndSignature( | ||||
&PythonQtWrapper_QXmlInputSource::staticMetaObject, | ||||
"setData(QXmlInputSource*,const QString& )"); | ||||
void* args[2] = {NULL, (void*)&dat}; | ||||
PyObject* result = PythonQtSignalTarget::call(obj, methodInfo, args, true); | ||||
if (result) { Py_DECREF(result); } | ||||
Py_DECREF(obj); | ||||
return; | ||||
} | ||||
} | ||||
QXmlInputSource::setData(dat); | ||||
} | ||||
florianlink
|
r13 | QXmlInputSource* PythonQtWrapper_QXmlInputSource::new_QXmlInputSource() | ||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QXmlInputSource(); } | ||
florianlink
|
r13 | |||
QXmlInputSource* PythonQtWrapper_QXmlInputSource::new_QXmlInputSource(QIODevice* dev) | ||||
{ | ||||
florianlink
|
r24 | return new PythonQtShell_QXmlInputSource(dev); } | ||
florianlink
|
r13 | |||
florianlink
|
r28 | void PythonQtWrapper_QXmlInputSource::fetchData(QXmlInputSource* theWrappedObject) | ||
florianlink
|
r24 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QXmlInputSource*)theWrappedObject)->promoted_fetchData(); | ||
florianlink
|
r24 | } | ||
void PythonQtWrapper_QXmlInputSource::setData(QXmlInputSource* theWrappedObject, const QByteArray& dat) | ||||
florianlink
|
r13 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QXmlInputSource*)theWrappedObject)->promoted_setData(dat); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QXmlInputSource::setData(QXmlInputSource* theWrappedObject, const QString& dat) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QXmlInputSource*)theWrappedObject)->promoted_setData(dat); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QXmlInputSource::fromRawData(QXmlInputSource* theWrappedObject, const QByteArray& data, bool beginning) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QXmlInputSource*)theWrappedObject)->promoted_fromRawData(data, beginning); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QString PythonQtWrapper_QXmlInputSource::data(QXmlInputSource* theWrappedObject) const | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QXmlInputSource*)theWrappedObject)->promoted_data(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | QChar PythonQtWrapper_QXmlInputSource::next(QXmlInputSource* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | return ((PythonQtPublicPromoter_QXmlInputSource*)theWrappedObject)->promoted_next(); | ||
florianlink
|
r13 | } | ||
florianlink
|
r28 | void PythonQtWrapper_QXmlInputSource::reset(QXmlInputSource* theWrappedObject) | ||
florianlink
|
r13 | { | ||
florianlink
|
r28 | ((PythonQtPublicPromoter_QXmlInputSource*)theWrappedObject)->promoted_reset(); | ||
florianlink
|
r13 | } | ||