/***************************************************************************
                            qt_QSqlCursor.cpp -  description
                             -------------------
    begin                : Tue Nov 20 20:51:20 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Tue Nov 20 20:51:20 2001, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "qt_QSqlCursor.h"
}

#include <qsqlcursor.h>

class QSqlCursorBridge : public QSqlCursor
{
public:
	QSqlCursorBridge(const QString& name, bool autopopulate, QSqlDatabase* db) : QSqlCursor(name, autopopulate, db) {}
	QSqlCursorBridge(const QSqlCursor& other) : QSqlCursor(other) {}
	~QSqlCursorBridge() {}
	void protected_afterSeek() {
		QSqlCursor::afterSeek();
		return;
	}
	bool  protected_exec(const QString& sql) {
		return (bool ) QSqlCursor::exec(sql);
	}
	 QVariant  protected_calculateField(const QString& name) {
		return ( QVariant ) QSqlCursor::calculateField(name);
	}
	 int  protected_update(const QString& filter, bool invalidate) {
		return ( int ) QSqlCursor::update(filter, invalidate);
	}
	 int  protected_del(const QString& filter, bool invalidate) {
		return ( int ) QSqlCursor::del(filter, invalidate);
	}
	 QString  protected_toString(const QString& prefix, QSqlField* field, const QString& fieldSep) {
		return ( QString ) QSqlCursor::toString(prefix, field, fieldSep);
	}
	 QString  protected_toString(QSqlRecord* rec, const QString& prefix, const QString& fieldSep, const QString& sep) {
		return ( QString ) QSqlCursor::toString(rec, prefix, fieldSep, sep);
	}
	 QString  protected_toString(const QSqlIndex& i, QSqlRecord* rec, const QString& prefix, const QString& fieldSep, const QString& sep) {
		return ( QString ) QSqlCursor::toString(i, rec, prefix, fieldSep, sep);
	}
};

qt_QSqlCursor * qt_new_QSqlCursor(qt_QString * name, int autopopulate, qt_QSqlDatabase* db){
	return (qt_QSqlCursor *) new QSqlCursorBridge((QString&)* (QString*)name, (bool)autopopulate, (QSqlDatabase*)db);
}
qt_QSqlCursor * qt_new_QSqlCursor1(qt_QSqlCursor* other){
	return (qt_QSqlCursor *) new QSqlCursorBridge((QSqlCursor&)* (QSqlCursor*)other);
}
void qt_del_QSqlCursor( qt_QSqlCursor* p ){
	delete (QSqlCursorBridge*) p;
}
qt_QVariant * qt_QSqlCursor_value( qt_QSqlCursor* instPointer,int i){
	return (qt_QVariant *)new QVariant(((QSqlCursorBridge*)instPointer)->value((int)i));
}
qt_QVariant * qt_QSqlCursor_value1( qt_QSqlCursor* instPointer,qt_QString * name){
	return (qt_QVariant *)new QVariant(((QSqlCursorBridge*)instPointer)->value((QString&)* (QString*)name));
}
qt_QSqlIndex* qt_QSqlCursor_primaryIndex( qt_QSqlCursor* instPointer,int prime){
	return (qt_QSqlIndex*)new QSqlIndex(((QSqlCursorBridge*)instPointer)->primaryIndex((bool)prime));
}
qt_QSqlIndex* qt_QSqlCursor_index( qt_QSqlCursor* instPointer,qt_QStringList* fieldNames){
	return (qt_QSqlIndex*)new QSqlIndex(((QSqlCursorBridge*)instPointer)->index((QStringList&)* (QStringList*)fieldNames));
}
qt_QSqlIndex* qt_QSqlCursor_index1( qt_QSqlCursor* instPointer,qt_QString * fieldName){
	return (qt_QSqlIndex*)new QSqlIndex(((QSqlCursorBridge*)instPointer)->index((QString&)* (QString*)fieldName));
}
qt_QSqlIndex* qt_QSqlCursor_index2( qt_QSqlCursor* instPointer,char* fieldName){
	return (qt_QSqlIndex*)new QSqlIndex(((QSqlCursorBridge*)instPointer)->index((char*)fieldName));
}
void qt_QSqlCursor_setPrimaryIndex( qt_QSqlCursor* instPointer,qt_QSqlIndex* idx){
	((QSqlCursorBridge*)instPointer)->setPrimaryIndex((QSqlIndex&)* (QSqlIndex*)idx);
	return;
}
//void qt_QSqlCursor_append( qt_QSqlCursor* instPointer,qt_QSqlFieldInfo* fieldInfo){
//	((QSqlCursorBridge*)instPointer)->append((QSqlFieldInfo&)* (QSqlFieldInfo*)fieldInfo);
//	return;
//}
//void qt_QSqlCursor_insert( qt_QSqlCursor* instPointer,int pos, qt_QSqlFieldInfo* fieldInfo){
//	((QSqlCursorBridge*)instPointer)->insert((int)pos, (QSqlFieldInfo&)* (QSqlFieldInfo*)fieldInfo);
//	return;
//}
void qt_QSqlCursor_remove( qt_QSqlCursor* instPointer,int pos){
	((QSqlCursorBridge*)instPointer)->remove((int)pos);
	return;
}
void qt_QSqlCursor_clear( qt_QSqlCursor* instPointer){
	((QSqlCursorBridge*)instPointer)->clear();
	return;
}
void qt_QSqlCursor_setGenerated( qt_QSqlCursor* instPointer,qt_QString * name, int generated){
	((QSqlCursorBridge*)instPointer)->setGenerated((QString&)* (QString*)name, (bool)generated);
	return;
}
void qt_QSqlCursor_setGenerated1( qt_QSqlCursor* instPointer,int i, int generated){
	((QSqlCursorBridge*)instPointer)->setGenerated((int)i, (bool)generated);
	return;
}
qt_QSqlRecord* qt_QSqlCursor_editBuffer( qt_QSqlCursor* instPointer,int copy){
	return (qt_QSqlRecord*) ((QSqlCursorBridge*)instPointer)->editBuffer((bool)copy);
}
qt_QSqlRecord* qt_QSqlCursor_primeInsert( qt_QSqlCursor* instPointer){
	return (qt_QSqlRecord*) ((QSqlCursorBridge*)instPointer)->primeInsert();
}
qt_QSqlRecord* qt_QSqlCursor_primeUpdate( qt_QSqlCursor* instPointer){
	return (qt_QSqlRecord*) ((QSqlCursorBridge*)instPointer)->primeUpdate();
}
qt_QSqlRecord* qt_QSqlCursor_primeDelete( qt_QSqlCursor* instPointer){
	return (qt_QSqlRecord*) ((QSqlCursorBridge*)instPointer)->primeDelete();
}
int qt_QSqlCursor_insert1( qt_QSqlCursor* instPointer,int invalidate){
	return (int) ((QSqlCursorBridge*)instPointer)->insert((bool)invalidate);
}
int qt_QSqlCursor_update( qt_QSqlCursor* instPointer,int invalidate){
	return (int) ((QSqlCursorBridge*)instPointer)->update((bool)invalidate);
}
int qt_QSqlCursor_del( qt_QSqlCursor* instPointer,int invalidate){
	return (int) ((QSqlCursorBridge*)instPointer)->del((bool)invalidate);
}
void qt_QSqlCursor_setMode( qt_QSqlCursor* instPointer,int flags){
	((QSqlCursorBridge*)instPointer)->setMode((int)flags);
	return;
}
int qt_QSqlCursor_mode( qt_QSqlCursor* instPointer){
	return (int) ((QSqlCursorBridge*)instPointer)->mode();
}
void qt_QSqlCursor_setCalculated( qt_QSqlCursor* instPointer,qt_QString * name, int calculated){
	((QSqlCursorBridge*)instPointer)->setCalculated((QString&)* (QString*)name, (bool)calculated);
	return;
}
int qt_QSqlCursor_isCalculated( qt_QSqlCursor* instPointer,qt_QString * name){
	return (int) ((QSqlCursorBridge*)instPointer)->isCalculated((QString&)* (QString*)name);
}
void qt_QSqlCursor_setTrimmed( qt_QSqlCursor* instPointer,qt_QString * name, int trim){
	((QSqlCursorBridge*)instPointer)->setTrimmed((QString&)* (QString*)name, (bool)trim);
	return;
}
int qt_QSqlCursor_isTrimmed( qt_QSqlCursor* instPointer,qt_QString * name){
	return (int) ((QSqlCursorBridge*)instPointer)->isTrimmed((QString&)* (QString*)name);
}
int qt_QSqlCursor_isReadOnly( qt_QSqlCursor* instPointer){
	return (int) ((QSqlCursorBridge*)instPointer)->isReadOnly();
}
int qt_QSqlCursor_canInsert( qt_QSqlCursor* instPointer){
	return (int) ((QSqlCursorBridge*)instPointer)->canInsert();
}
int qt_QSqlCursor_canUpdate( qt_QSqlCursor* instPointer){
	return (int) ((QSqlCursorBridge*)instPointer)->canUpdate();
}
int qt_QSqlCursor_canDelete( qt_QSqlCursor* instPointer){
	return (int) ((QSqlCursorBridge*)instPointer)->canDelete();
}
int qt_QSqlCursor_select( qt_QSqlCursor* instPointer){
	return (int) ((QSqlCursorBridge*)instPointer)->select();
}
int qt_QSqlCursor_select1( qt_QSqlCursor* instPointer,qt_QSqlIndex* sort){
	return (int) ((QSqlCursorBridge*)instPointer)->select((QSqlIndex&)* (QSqlIndex*)sort);
}
int qt_QSqlCursor_select2( qt_QSqlCursor* instPointer,qt_QSqlIndex* filter, qt_QSqlIndex* sort){
	return (int) ((QSqlCursorBridge*)instPointer)->select((QSqlIndex&)* (QSqlIndex*)filter, (QSqlIndex&)* (QSqlIndex*)sort);
}
int qt_QSqlCursor_select3( qt_QSqlCursor* instPointer,qt_QString * filter, qt_QSqlIndex* sort){
	return (int) ((QSqlCursorBridge*)instPointer)->select((QString&)* (QString*)filter, (QSqlIndex&)* (QSqlIndex*)sort);
}
void qt_QSqlCursor_setSort( qt_QSqlCursor* instPointer,qt_QSqlIndex* sort){
	((QSqlCursorBridge*)instPointer)->setSort((QSqlIndex&)* (QSqlIndex*)sort);
	return;
}
qt_QSqlIndex* qt_QSqlCursor_sort( qt_QSqlCursor* instPointer){
	return (qt_QSqlIndex*)new QSqlIndex(((QSqlCursorBridge*)instPointer)->sort());
}
void qt_QSqlCursor_setFilter( qt_QSqlCursor* instPointer,qt_QString * filter){
	((QSqlCursorBridge*)instPointer)->setFilter((QString&)* (QString*)filter);
	return;
}
qt_QString * qt_QSqlCursor_filter( qt_QSqlCursor* instPointer){
	return (qt_QString *)new QString(((QSqlCursorBridge*)instPointer)->filter());
}
void qt_QSqlCursor_setName( qt_QSqlCursor* instPointer,qt_QString * name, int autopopulate){
	((QSqlCursorBridge*)instPointer)->setName((QString&)* (QString*)name, (bool)autopopulate);
	return;
}
qt_QString * qt_QSqlCursor_name( qt_QSqlCursor* instPointer){
	return (qt_QString *)new QString(((QSqlCursorBridge*)instPointer)->name());
}
//qt_QString * qt_QSqlCursor_toString( qt_QSqlCursor* instPointer,qt_QString * prefix, QString arg1, "  arg2){
//	return (qt_QString *)new QString(((QSqlCursorBridge*)instPointer)->toString((QString&)* (QString*)prefix, (QString& sep ")arg1, (" )arg2));
//}
void qt_QSqlCursor_afterSeek( qt_QSqlCursor* instPointer){
	((QSqlCursorBridge*)instPointer)->protected_afterSeek();
	return;
}
int qt_QSqlCursor_exec( qt_QSqlCursor* instPointer,qt_QString * sql){
	return (int) ((QSqlCursorBridge*)instPointer)->protected_exec((QString&)* (QString*)sql);
}
qt_QVariant * qt_QSqlCursor_calculateField( qt_QSqlCursor* instPointer,qt_QString * name){
	return (qt_QVariant *)new QVariant(((QSqlCursorBridge*)instPointer)->protected_calculateField((QString&)* (QString*)name));
}
int qt_QSqlCursor_update1( qt_QSqlCursor* instPointer,qt_QString * filter, int invalidate){
	return (int) ((QSqlCursorBridge*)instPointer)->protected_update((QString&)* (QString*)filter, (bool)invalidate);
}
int qt_QSqlCursor_del1( qt_QSqlCursor* instPointer,qt_QString * filter, int invalidate){
	return (int) ((QSqlCursorBridge*)instPointer)->protected_del((QString&)* (QString*)filter, (bool)invalidate);
}
qt_QString * qt_QSqlCursor_toString1( qt_QSqlCursor* instPointer,qt_QString * prefix, qt_QSqlField* field, qt_QString * fieldSep){
	return (qt_QString *)new QString(((QSqlCursorBridge*)instPointer)->protected_toString((QString&)* (QString*)prefix, (QSqlField*)field, (QString&)* (QString*)fieldSep));
}
qt_QString * qt_QSqlCursor_toString2( qt_QSqlCursor* instPointer,qt_QSqlRecord* rec, qt_QString * prefix, qt_QString * fieldSep, qt_QString * sep){
	return (qt_QString *)new QString(((QSqlCursorBridge*)instPointer)->protected_toString((QSqlRecord*)rec, (QString&)* (QString*)prefix, (QString&)* (QString*)fieldSep, (QString&)* (QString*)sep));
}
qt_QString * qt_QSqlCursor_toString3( qt_QSqlCursor* instPointer,qt_QSqlIndex* i, qt_QSqlRecord* rec, qt_QString * prefix, qt_QString * fieldSep, qt_QString * sep){
	return (qt_QString *)new QString(((QSqlCursorBridge*)instPointer)->protected_toString((QSqlIndex&)* (QSqlIndex*)i, (QSqlRecord*)rec, (QString&)* (QString*)prefix, (QString&)* (QString*)fieldSep, (QString&)* (QString*)sep));
}
qt_QSqlQuery* qt_QSqlCursor_QSqlQuery(qt_QSqlCursor* instPointer){
	return (qt_QSqlQuery*) (QSqlQuery *) (QSqlCursor *) instPointer;
}
qt_QSqlRecord* qt_QSqlCursor_QSqlRecord(qt_QSqlCursor* instPointer){
	return (qt_QSqlRecord*) (QSqlRecord *) (QSqlCursor *) instPointer;
}
