/***************************************************************************
                            qt_QStringList.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_QStringList.h"
}

#include <qstringlist.h>

static QStringList::Iterator	_iterator;

class QStringListBridge : public QStringList
{
public:
	QStringListBridge() : QStringList() {}
	QStringListBridge(const QString& i) : QStringList(i) {}
	QStringListBridge(const char* i) : QStringList(i) {}
};

qt_QStringList * qt_new_QStringList(){
	return (qt_QStringList *) new QStringListBridge();
}
qt_QStringList * qt_new_QStringList3(qt_QString * i){
	return (qt_QStringList *) new QStringListBridge((QString&)* (QString*)i);
}
qt_QStringList * qt_new_QStringList4(char* i){
	return (qt_QStringList *) new QStringListBridge((char*)i);
}
void qt_QStringList_sort( qt_QStringList* instPointer){
	((QStringListBridge*)instPointer)->sort();
	return;
}
qt_QString * qt_QStringList_join( qt_QStringList* instPointer,qt_QString * sep){
	return (qt_QString *)new QString(((QStringListBridge*)instPointer)->join((QString&)* (QString*)sep));
}
qt_QStringList* qt_QStringList_grep( qt_QStringList* instPointer,qt_QString * str, int cs){
	return (qt_QStringList*)new QStringList(((QStringListBridge*)instPointer)->grep((QString&)* (QString*)str, (bool)cs));
}
qt_QStringList* qt_QStringList_grep1( qt_QStringList* instPointer,qt_QRegExp* expr){
	return (qt_QStringList*)new QStringList(((QStringListBridge*)instPointer)->grep((QRegExp&)* (QRegExp*)expr));
}
qt_QStringList* qt_QStringList_fromStrList( qt_QStrList * arg1){
	return (qt_QStringList*)new QStringList(QStringListBridge::fromStrList((QStrList&)* (QStrList*)arg1));
}
qt_QStringList* qt_QStringList_split( qt_QString * sep, qt_QString * str, int allowEmptyEntries){
	return (qt_QStringList*)new QStringList(QStringListBridge::split((QString&)* (QString*)sep, (QString&)* (QString*)str, (bool)allowEmptyEntries));
}
qt_QStringList* qt_QStringList_split1( qt_QChar* sep, qt_QString * str, int allowEmptyEntries){
	return (qt_QStringList*)new QStringList(QStringListBridge::split((QChar&)* (QChar*)sep, (QString&)* (QString*)str, (bool)allowEmptyEntries));
}
qt_QStringList* qt_QStringList_split2( qt_QRegExp* sep, qt_QString * str, int allowEmptyEntries){
	return (qt_QStringList*)new QStringList(QStringListBridge::split((QRegExp&)* (QRegExp*)sep, (QString&)* (QString*)str, (bool)allowEmptyEntries));
}
void qt_QStringList_begin( qt_QStringList* instPointer){
	_iterator = ((QStringList*)instPointer)->begin();
	return;
}
qt_QString * qt_QStringList_current(){
	if ( *_iterator == NULL ) {
		return NULL;
	} else {
		return (qt_QString *) new QString(*_iterator);
	}
}
qt_QString * qt_QStringList_next(){
	_iterator++;
	return qt_QStringList_current();
}
void qt_QStringList_clear( qt_QStringList* instPointer){
	((QStringList*)instPointer)->clear();
}
void qt_QStringList_append( qt_QStringList* instPointer, qt_QString * string){
	((QStringList*)instPointer)->append((QString&) * (QString*)string);
}

