/***************************************************************************
                            kde_DOMString.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, 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 "kde_DOMString.h"
}

#include <dom/dom_string.h>

class DOMStringBridge : public DOM::DOMString
{
public:
	DOMStringBridge() : DOMString() {}
	DOMStringBridge(const QChar* str, uint len) : DOMString(str, len) {}
	DOMStringBridge(const QString& arg1) : DOMString(arg1) {}
	DOMStringBridge(const char* str) : DOMString(str) {}
	~DOMStringBridge() {}
	DOMStringBridge(const DOMString& str) : DOMString(str) {}
};

kde_DOMString * kde_new_DOMString(){
	return (kde_DOMString *) new DOMStringBridge();
}
kde_DOMString * kde_new_DOMString1(qt_QChar* str, unsigned int len){
	return (kde_DOMString *) new DOMStringBridge((QChar*)str, (uint)len);
}
kde_DOMString * kde_new_DOMString2(qt_QString * arg1){
	return (kde_DOMString *) new DOMStringBridge((QString&)* (QString*)arg1);
}
kde_DOMString * kde_new_DOMString3(char* str){
	return (kde_DOMString *) new DOMStringBridge((char*)str);
}
void kde_del_DOMString( kde_DOMString* p ){
	delete (DOMStringBridge*) p;
}
kde_DOMString * kde_new_DOMString5(kde_DOMString* str){
	return (kde_DOMString *) new DOMStringBridge((DOM::DOMString&)* (DOM::DOMString*)str);
}
void kde_DOMString_insert( kde_DOMString* instPointer,kde_DOMString* str, unsigned int pos){
	((DOMStringBridge*)instPointer)->insert((DOM::DOMString)* (DOM::DOMString*)str, (uint)pos);
	return;
}
int kde_DOMString_find( kde_DOMString* instPointer,qt_QChar* c, int start){
	return (int) ((DOMStringBridge*)instPointer)->find((QChar)* (QChar*)c, (int)start);
}
unsigned int kde_DOMString_length( kde_DOMString* instPointer){
	return (unsigned int) ((DOMStringBridge*)instPointer)->length();
}
void kde_DOMString_truncate( kde_DOMString* instPointer,unsigned int len){
	((DOMStringBridge*)instPointer)->truncate((unsigned int)len);
	return;
}
void kde_DOMString_remove( kde_DOMString* instPointer,unsigned int pos, int len){
	((DOMStringBridge*)instPointer)->remove((unsigned int)pos, (int)len);
	return;
}
kde_DOMString* kde_DOMString_split( kde_DOMString* instPointer,unsigned int pos){
	return (kde_DOMString*)new DOM::DOMString(((DOMStringBridge*)instPointer)->split((unsigned int)pos));
}
kde_DOMString* kde_DOMString_lower( kde_DOMString* instPointer){
	return (kde_DOMString*)new DOM::DOMString(((DOMStringBridge*)instPointer)->lower());
}
kde_DOMString* kde_DOMString_upper( kde_DOMString* instPointer){
	return (kde_DOMString*)new DOM::DOMString(((DOMStringBridge*)instPointer)->upper());
}
qt_QChar* kde_DOMString_unicode( kde_DOMString* instPointer){
	return (qt_QChar*) ((DOMStringBridge*)instPointer)->unicode();
}
qt_QString * kde_DOMString_string( kde_DOMString* instPointer){
	return (qt_QString *)new QString(((DOMStringBridge*)instPointer)->string());
}
int kde_DOMString_toInt( kde_DOMString* instPointer){
	return (int) ((DOMStringBridge*)instPointer)->toInt();
}
int kde_DOMString_percentage( kde_DOMString* instPointer,int _percentage){
	return (int) ((DOMStringBridge*)instPointer)->percentage((int&)_percentage);
}
kde_DOMString* kde_DOMString_copy( kde_DOMString* instPointer){
	return (kde_DOMString*)new DOM::DOMString(((DOMStringBridge*)instPointer)->copy());
}
int kde_DOMString_isNull( kde_DOMString* instPointer){
	return (int) ((DOMStringBridge*)instPointer)->isNull();
}
int kde_DOMString_isEmpty( kde_DOMString* instPointer){
	return (int) ((DOMStringBridge*)instPointer)->isEmpty();
}
//kde_DOMStringImpl* kde_DOMString_implementation( kde_DOMString* instPointer){
//	return (kde_DOMStringImpl*) ((DOMStringBridge*)instPointer)->implementation();
//}
