/***************************************************************************
                            QDomCharacterData.cpp -  description
                             -------------------
    begin                : Wed Nov 21 17:05:56 2001
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Nov 21 17:05:56 2001, using kalyptus 0.9.
 ***************************************************************************/

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

#define _BOOL_H_
#include <qdom.h>
#include <qstring.h>
#include <qcstring.h>

#include <qtjava/QtSupport.h>
#include <qtjava/QDomCharacterData.h>

class QDomCharacterDataJBridge : public QDomCharacterData
{
public:
	QDomCharacterDataJBridge() : QDomCharacterData() {}
	QDomCharacterDataJBridge(const QDomCharacterData& x) : QDomCharacterData(x) {}
	~QDomCharacterDataJBridge() {QtSupport::qtKeyDeleted(this);}
};


JNIEXPORT void JNICALL
Java_org_kde_qt_QDomCharacterData_newQDomCharacterData__(JNIEnv *env, jobject obj)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QDomCharacterDataJBridge());
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDomCharacterData_newQDomCharacterData__Lorg_kde_qt_QDomCharacterData_2(JNIEnv *env, jobject obj, jobject x)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QDomCharacterDataJBridge((QDomCharacterData&) *(QDomCharacterData *) QtSupport::getQt(env, x)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDomCharacterData_finalize(JNIEnv *env, jobject obj)
{
	if (QtSupport::allocatedInJavaWorld(env, obj)) {
		delete (QDomCharacterData*)QtSupport::getQt(env, obj);
		QtSupport::setQt(env, obj, 0);
	}
	return;
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QDomCharacterData_substringData(JNIEnv *env, jobject obj, jlong offset, jlong count)
{
	QString  _qstring;
	_qstring = ((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->substringData((unsigned long) offset, (unsigned long) count);
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDomCharacterData_appendData(JNIEnv *env, jobject obj, jstring arg)
{
static QString * _qstring_arg = 0;
	((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->appendData((QString&) * (QString *) QtSupport::toQString(env, arg, &_qstring_arg));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDomCharacterData_insertData(JNIEnv *env, jobject obj, jlong offset, jstring arg)
{
static QString * _qstring_arg = 0;
	((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->insertData((unsigned long) offset, (QString&) * (QString *) QtSupport::toQString(env, arg, &_qstring_arg));
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDomCharacterData_deleteData(JNIEnv *env, jobject obj, jlong offset, jlong count)
{
	((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->deleteData((unsigned long) offset, (unsigned long) count);
	return;
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDomCharacterData_replaceData(JNIEnv *env, jobject obj, jlong offset, jlong count, jstring arg)
{
static QString * _qstring_arg = 0;
	((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->replaceData((unsigned long) offset, (unsigned long) count, (QString&) * (QString *) QtSupport::toQString(env, arg, &_qstring_arg));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QDomCharacterData_length(JNIEnv *env, jobject obj)
{
	return (jint) ((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->length();
}

JNIEXPORT jstring JNICALL
Java_org_kde_qt_QDomCharacterData_data(JNIEnv *env, jobject obj)
{
	QString  _qstring;
	_qstring = ((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->data();
	return QtSupport::fromQString(env, &_qstring);
}

JNIEXPORT void JNICALL
Java_org_kde_qt_QDomCharacterData_setData(JNIEnv *env, jobject obj, jstring arg1)
{
static QString * _qstring_arg1 = 0;
	((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->setData((QString&) * (QString *) QtSupport::toQString(env, arg1, &_qstring_arg1));
	return;
}

JNIEXPORT jint JNICALL
Java_org_kde_qt_QDomCharacterData_nodeType(JNIEnv *env, jobject obj)
{
	return (jint) ((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->nodeType();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QDomCharacterData_isCharacterData(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QDomCharacterDataJBridge*) QtSupport::getQt(env, obj))->isCharacterData();
}

