/***************************************************************************
                            qt_QRegExp.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_QRegExp.h"
}

#include <qregexp.h>

class QRegExpBridge : public QRegExp
{
public:
	QRegExpBridge() : QRegExp() {}
	QRegExpBridge(const QString& pattern, bool caseSensitive, bool wildcard) : QRegExp(pattern, caseSensitive, wildcard) {}
	QRegExpBridge(const QRegExp& rx) : QRegExp(rx) {}
	~QRegExpBridge() {}
};

qt_QRegExp * qt_new_QRegExp(){
	return (qt_QRegExp *) new QRegExpBridge();
}
qt_QRegExp * qt_new_QRegExp1(qt_QString * pattern, int caseSensitive, int wildcard){
	return (qt_QRegExp *) new QRegExpBridge((QString&)* (QString*)pattern, (bool)caseSensitive, (bool)wildcard);
}
qt_QRegExp * qt_new_QRegExp2(qt_QRegExp* rx){
	return (qt_QRegExp *) new QRegExpBridge((QRegExp&)* (QRegExp*)rx);
}
void qt_del_QRegExp( qt_QRegExp* p ){
	delete (QRegExpBridge*) p;
}
int qt_QRegExp_isEmpty( qt_QRegExp* instPointer){
	return (int) ((QRegExpBridge*)instPointer)->isEmpty();
}
int qt_QRegExp_isValid( qt_QRegExp* instPointer){
	return (int) ((QRegExpBridge*)instPointer)->isValid();
}
qt_QString * qt_QRegExp_pattern( qt_QRegExp* instPointer){
	return (qt_QString *)new QString(((QRegExpBridge*)instPointer)->pattern());
}
void qt_QRegExp_setPattern( qt_QRegExp* instPointer,qt_QString * pattern){
	((QRegExpBridge*)instPointer)->setPattern((QString&)* (QString*)pattern);
	return;
}
int qt_QRegExp_caseSensitive( qt_QRegExp* instPointer){
	return (int) ((QRegExpBridge*)instPointer)->caseSensitive();
}
void qt_QRegExp_setCaseSensitive( qt_QRegExp* instPointer,int sensitive){
	((QRegExpBridge*)instPointer)->setCaseSensitive((bool)sensitive);
	return;
}
int qt_QRegExp_wildcard( qt_QRegExp* instPointer){
	return (int) ((QRegExpBridge*)instPointer)->wildcard();
}
void qt_QRegExp_setWildcard( qt_QRegExp* instPointer,int wildcard){
	((QRegExpBridge*)instPointer)->setWildcard((bool)wildcard);
	return;
}
int qt_QRegExp_minimal( qt_QRegExp* instPointer){
	return (int) ((QRegExpBridge*)instPointer)->minimal();
}
void qt_QRegExp_setMinimal( qt_QRegExp* instPointer,int minimal){
	((QRegExpBridge*)instPointer)->setMinimal((bool)minimal);
	return;
}
int qt_QRegExp_exactMatch( qt_QRegExp* instPointer,qt_QString * str){
	return (int) ((QRegExpBridge*)instPointer)->exactMatch((QString&)* (QString*)str);
}
int qt_QRegExp_match( qt_QRegExp* instPointer,qt_QString * str, int index, int* len, int indexIsStart){
	return (int) ((QRegExpBridge*)instPointer)->match((QString&)* (QString*)str, (int)index, (int*)len, (bool)indexIsStart);
}
int qt_QRegExp_search( qt_QRegExp* instPointer,qt_QString * str, int start){
	return (int) ((QRegExpBridge*)instPointer)->search((QString&)* (QString*)str, (int)start);
}
int qt_QRegExp_searchRev( qt_QRegExp* instPointer,qt_QString * str, int start){
	return (int) ((QRegExpBridge*)instPointer)->searchRev((QString&)* (QString*)str, (int)start);
}
int qt_QRegExp_matchedLength( qt_QRegExp* instPointer){
	return (int) ((QRegExpBridge*)instPointer)->matchedLength();
}
qt_QStringList* qt_QRegExp_capturedTexts( qt_QRegExp* instPointer){
	return (qt_QStringList*)new QStringList(((QRegExpBridge*)instPointer)->capturedTexts());
}
qt_QString * qt_QRegExp_cap( qt_QRegExp* instPointer,int nth){
	return (qt_QString *)new QString(((QRegExpBridge*)instPointer)->cap((int)nth));
}
int qt_QRegExp_pos( qt_QRegExp* instPointer,int nth){
	return (int) ((QRegExpBridge*)instPointer)->pos((int)nth);
}
