//Auto-generated by kalyptus. DO NOT EDIT.
#include <smoke.h>
#include <qt_smoke.h>
#include <qvariant.h>
#include <qstring.h>
#include <qsqlquery.h>
#include <qsqlerror.h>

class x_QSqlQuery : public QSqlQuery {
public:
    static void x_0(Smoke::Stack x) {
	// QSqlQuery(QSqlResult*)
	x_QSqlQuery* xret = new x_QSqlQuery((QSqlResult*)x[1].s_class);
	x[0].s_class = (void*)xret;
    }
    x_QSqlQuery(QSqlResult* x1) : QSqlQuery(x1) {
    }
    static void x_1(Smoke::Stack x) {
	// QSqlQuery(const QString&, QSqlDatabase*)
	x_QSqlQuery* xret = new x_QSqlQuery(*(const QString *)x[1].s_voidp,(QSqlDatabase*)x[2].s_class);
	x[0].s_class = (void*)xret;
    }
    x_QSqlQuery(const QString& x1, QSqlDatabase* x2) : QSqlQuery(x1, x2) {
    }
    static void x_2(Smoke::Stack x) {
	// QSqlQuery(const QString&)
	x_QSqlQuery* xret = new x_QSqlQuery(*(const QString *)x[1].s_voidp);
	x[0].s_class = (void*)xret;
    }
    x_QSqlQuery(const QString& x1) : QSqlQuery(x1) {
    }
    static void x_3(Smoke::Stack x) {
	// QSqlQuery()
	x_QSqlQuery* xret = new x_QSqlQuery();
	x[0].s_class = (void*)xret;
    }
    x_QSqlQuery() : QSqlQuery() {
    }
    static void x_4(Smoke::Stack x) {
	// QSqlQuery(const QSqlQuery&)
	x_QSqlQuery* xret = new x_QSqlQuery(*(const QSqlQuery *)x[1].s_class);
	x[0].s_class = (void*)xret;
    }
    x_QSqlQuery(const QSqlQuery& x1) : QSqlQuery(x1) {
    }
    void x_5(Smoke::Stack x) {
	// operator=(const QSqlQuery&)
	QSqlQuery& xret = this->QSqlQuery::operator=(*(const QSqlQuery *)x[1].s_class);
	x[0].s_class = (void*)&xret;
    }
    void x_6(Smoke::Stack x) const {
	// isValid()
	bool xret = this->QSqlQuery::isValid();
	x[0].s_bool = xret;
    }
    void x_7(Smoke::Stack x) const {
	// isActive()
	bool xret = this->QSqlQuery::isActive();
	x[0].s_bool = xret;
    }
    void x_8(Smoke::Stack x) const {
	// isNull(int)
	bool xret = this->QSqlQuery::isNull((int)x[1].s_int);
	x[0].s_bool = xret;
    }
    void x_9(Smoke::Stack x) const {
	// at()
	int xret = this->QSqlQuery::at();
	x[0].s_int = xret;
    }
    void x_10(Smoke::Stack x) const {
	// lastQuery()
	QString xret = this->QSqlQuery::lastQuery();
	x[0].s_voidp = (void*)new QString(xret);
    }
    void x_11(Smoke::Stack x) const {
	// numRowsAffected()
	int xret = this->QSqlQuery::numRowsAffected();
	x[0].s_int = xret;
    }
    void x_12(Smoke::Stack x) const {
	// lastError()
	QSqlError xret = this->QSqlQuery::lastError();
	x[0].s_class = (void*)new QSqlError(xret);
    }
    void x_13(Smoke::Stack x) const {
	// isSelect()
	bool xret = this->QSqlQuery::isSelect();
	x[0].s_bool = xret;
    }
    void x_14(Smoke::Stack x) const {
	// size()
	int xret = this->QSqlQuery::size();
	x[0].s_int = xret;
    }
    void x_15(Smoke::Stack x) const {
	// driver()
	const QSqlDriver* xret = this->QSqlQuery::driver();
	x[0].s_class = (void*)xret;
    }
    void x_16(Smoke::Stack x) const {
	// result()
	const QSqlResult* xret = this->QSqlQuery::result();
	x[0].s_class = (void*)xret;
    }
    void x_17(Smoke::Stack x) const {
	// isForwardOnly()
	bool xret = this->QSqlQuery::isForwardOnly();
	x[0].s_bool = xret;
    }
    void x_18(Smoke::Stack x) {
	// setForwardOnly(bool)
	this->QSqlQuery::setForwardOnly((bool)x[1].s_bool);
	(void)x; // noop (for compiler warning)
    }
    void x_19(Smoke::Stack x) {
	// exec(const QString&)
	bool xret = this->QSqlQuery::exec(*(const QString *)x[1].s_voidp);
	x[0].s_bool = xret;
    }
    void x_20(Smoke::Stack x) const {
	// value(int)
	QVariant xret = this->QSqlQuery::value((int)x[1].s_int);
	x[0].s_class = (void*)new QVariant(xret);
    }
    void x_21(Smoke::Stack x) {
	// seek(int, bool)
	bool xret = this->QSqlQuery::seek((int)x[1].s_int,(bool)x[2].s_bool);
	x[0].s_bool = xret;
    }
    void x_22(Smoke::Stack x) {
	// seek(int)
	bool xret = this->QSqlQuery::seek((int)x[1].s_int);
	x[0].s_bool = xret;
    }
    void x_23(Smoke::Stack x) {
	// next()
	bool xret = this->QSqlQuery::next();
	x[0].s_bool = xret;
    }
    void x_24(Smoke::Stack x) {
	// prev()
	bool xret = this->QSqlQuery::prev();
	x[0].s_bool = xret;
    }
    void x_25(Smoke::Stack x) {
	// first()
	bool xret = this->QSqlQuery::first();
	x[0].s_bool = xret;
    }
    void x_26(Smoke::Stack x) {
	// last()
	bool xret = this->QSqlQuery::last();
	x[0].s_bool = xret;
    }
    void x_27(Smoke::Stack x) {
	// exec()
	bool xret = this->QSqlQuery::exec();
	x[0].s_bool = xret;
    }
    void x_28(Smoke::Stack x) {
	// prepare(const QString&)
	bool xret = this->QSqlQuery::prepare(*(const QString *)x[1].s_voidp);
	x[0].s_bool = xret;
    }
    void x_29(Smoke::Stack x) {
	// bindValue(const QString&, const QVariant&)
	this->QSqlQuery::bindValue(*(const QString *)x[1].s_voidp,*(const QVariant *)x[2].s_class);
	(void)x; // noop (for compiler warning)
    }
    void x_30(Smoke::Stack x) {
	// bindValue(int, const QVariant&)
	this->QSqlQuery::bindValue((int)x[1].s_int,*(const QVariant *)x[2].s_class);
	(void)x; // noop (for compiler warning)
    }
    void x_31(Smoke::Stack x) {
	// addBindValue(const QVariant&)
	this->QSqlQuery::addBindValue(*(const QVariant *)x[1].s_class);
	(void)x; // noop (for compiler warning)
    }
    void x_32(Smoke::Stack x) {
	// beforeSeek()
	this->QSqlQuery::beforeSeek();
	(void)x; // noop (for compiler warning)
    }
    void x_33(Smoke::Stack x) {
	// afterSeek()
	this->QSqlQuery::afterSeek();
	(void)x; // noop (for compiler warning)
    }
    virtual void afterSeek() {
	Smoke::StackItem x[1];
	if(qt_Smoke->binding->callMethod(9248, (void*)this, x)) return;
	this->QSqlQuery::afterSeek();
    }
    virtual void beforeSeek() {
	Smoke::StackItem x[1];
	if(qt_Smoke->binding->callMethod(9247, (void*)this, x)) return;
	this->QSqlQuery::beforeSeek();
    }
    virtual bool exec(const QString& x1) {
	Smoke::StackItem x[2];
	x[1].s_voidp = (void*)&x1;
	if(qt_Smoke->binding->callMethod(9234, (void*)this, x)) return (bool)x[0].s_bool;
	return this->QSqlQuery::exec(x1);
    }
    virtual bool first() {
	Smoke::StackItem x[1];
	if(qt_Smoke->binding->callMethod(9240, (void*)this, x)) return (bool)x[0].s_bool;
	return this->QSqlQuery::first();
    }
    virtual bool last() {
	Smoke::StackItem x[1];
	if(qt_Smoke->binding->callMethod(9241, (void*)this, x)) return (bool)x[0].s_bool;
	return this->QSqlQuery::last();
    }
    virtual bool next() {
	Smoke::StackItem x[1];
	if(qt_Smoke->binding->callMethod(9238, (void*)this, x)) return (bool)x[0].s_bool;
	return this->QSqlQuery::next();
    }
    virtual bool prev() {
	Smoke::StackItem x[1];
	if(qt_Smoke->binding->callMethod(9239, (void*)this, x)) return (bool)x[0].s_bool;
	return this->QSqlQuery::prev();
    }
    virtual bool seek(int x1, bool x2) {
	Smoke::StackItem x[3];
	x[1].s_int = x1;
	x[2].s_bool = x2;
	if(qt_Smoke->binding->callMethod(9236, (void*)this, x)) return (bool)x[0].s_bool;
	return this->QSqlQuery::seek(x1, x2);
    }
    virtual QVariant value(int x1) const {
	Smoke::StackItem x[2];
	x[1].s_int = x1;
	if(qt_Smoke->binding->callMethod(9235, (void*)this, x)) {
	    QVariant *xptr = (QVariant *)x[0].s_class;
	    QVariant xret(*xptr);
	    delete xptr;
	    return xret;
	}
	return this->QSqlQuery::value(x1);
    }
    ~x_QSqlQuery() { qt_Smoke->binding->deleted(291, (void*)this); }
};
void xcall_QSqlQuery(Smoke::Index xi, void *obj, Smoke::Stack args) {
    x_QSqlQuery *xself = (x_QSqlQuery*)obj;
    switch(xi) {
	case 0: x_QSqlQuery::x_0(args);	break;
	case 1: x_QSqlQuery::x_1(args);	break;
	case 2: x_QSqlQuery::x_2(args);	break;
	case 3: x_QSqlQuery::x_3(args);	break;
	case 4: x_QSqlQuery::x_4(args);	break;
	case 5: xself->x_5(args);	break;
	case 6: xself->x_6(args);	break;
	case 7: xself->x_7(args);	break;
	case 8: xself->x_8(args);	break;
	case 9: xself->x_9(args);	break;
	case 10: xself->x_10(args);	break;
	case 11: xself->x_11(args);	break;
	case 12: xself->x_12(args);	break;
	case 13: xself->x_13(args);	break;
	case 14: xself->x_14(args);	break;
	case 15: xself->x_15(args);	break;
	case 16: xself->x_16(args);	break;
	case 17: xself->x_17(args);	break;
	case 18: xself->x_18(args);	break;
	case 19: xself->x_19(args);	break;
	case 20: xself->x_20(args);	break;
	case 21: xself->x_21(args);	break;
	case 22: xself->x_22(args);	break;
	case 23: xself->x_23(args);	break;
	case 24: xself->x_24(args);	break;
	case 25: xself->x_25(args);	break;
	case 26: xself->x_26(args);	break;
	case 27: xself->x_27(args);	break;
	case 28: xself->x_28(args);	break;
	case 29: xself->x_29(args);	break;
	case 30: xself->x_30(args);	break;
	case 31: xself->x_31(args);	break;
	case 32: xself->x_32(args);	break;
	case 33: xself->x_33(args);	break;
	case 34: delete (QSqlQuery*)xself;	break;
    }
}
