/***************************************************************************
                            qt_QSqlIndex.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_QSqlIndex.h"
}

#include <qsqlindex.h>

class QSqlIndexBridge : public QSqlIndex
{
public:
	QSqlIndexBridge(const QString& cursorName, const QString& name) : QSqlIndex(cursorName, name) {}
	QSqlIndexBridge(const QSqlIndex& other) : QSqlIndex(other) {}
	~QSqlIndexBridge() {}
};

qt_QSqlIndex * qt_new_QSqlIndex(qt_QString * cursorName, qt_QString * name){
	return (qt_QSqlIndex *) new QSqlIndexBridge((QString&)* (QString*)cursorName, (QString&)* (QString*)name);
}
qt_QSqlIndex * qt_new_QSqlIndex1(qt_QSqlIndex* other){
	return (qt_QSqlIndex *) new QSqlIndexBridge((QSqlIndex&)* (QSqlIndex*)other);
}
void qt_del_QSqlIndex( qt_QSqlIndex* p ){
	delete (QSqlIndexBridge*) p;
}
void qt_QSqlIndex_setCursorName( qt_QSqlIndex* instPointer,qt_QString * cursorName){
	((QSqlIndexBridge*)instPointer)->setCursorName((QString&)* (QString*)cursorName);
	return;
}
qt_QString * qt_QSqlIndex_cursorName( qt_QSqlIndex* instPointer){
	return (qt_QString *)new QString(((QSqlIndexBridge*)instPointer)->cursorName());
}
void qt_QSqlIndex_setName( qt_QSqlIndex* instPointer,qt_QString * name){
	((QSqlIndexBridge*)instPointer)->setName((QString&)* (QString*)name);
	return;
}
qt_QString * qt_QSqlIndex_name( qt_QSqlIndex* instPointer){
	return (qt_QString *)new QString(((QSqlIndexBridge*)instPointer)->name());
}
void qt_QSqlIndex_append( qt_QSqlIndex* instPointer,qt_QSqlField* field){
	((QSqlIndexBridge*)instPointer)->append((QSqlField&)* (QSqlField*)field);
	return;
}
void qt_QSqlIndex_append1( qt_QSqlIndex* instPointer,qt_QSqlField* field, int desc){
	((QSqlIndexBridge*)instPointer)->append((QSqlField&)* (QSqlField*)field, (bool)desc);
	return;
}
int qt_QSqlIndex_isDescending( qt_QSqlIndex* instPointer,int i){
	return (int) ((QSqlIndexBridge*)instPointer)->isDescending((int)i);
}
void qt_QSqlIndex_setDescending( qt_QSqlIndex* instPointer,int i, int desc){
	((QSqlIndexBridge*)instPointer)->setDescending((int)i, (bool)desc);
	return;
}
//qt_QString * qt_QSqlIndex_toString( qt_QSqlIndex* instPointer,qt_QString * prefix, QString arg1, " arg2, int verbose){
//	return (qt_QString *)new QString(((QSqlIndexBridge*)instPointer)->toString((QString&)* (QString*)prefix, (QString& sep ")arg1, (")arg2, (bool)verbose));
//}
qt_QStringList* qt_QSqlIndex_toStringList( qt_QSqlIndex* instPointer,qt_QString * prefix, int verbose){
	return (qt_QStringList*)new QStringList(((QSqlIndexBridge*)instPointer)->toStringList((QString&)* (QString*)prefix, (bool)verbose));
}
qt_QSqlIndex* qt_QSqlIndex_fromStringList( qt_QStringList* l, qt_QSqlCursor* cursor){
	return (qt_QSqlIndex*)new QSqlIndex(QSqlIndexBridge::fromStringList((QStringList&)* (QStringList*)l, (QSqlCursor*)cursor));
}
