/***************************************************************************
                            QDomImplementation.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/QDomImplementation.h>

class QDomImplementationJBridge : public QDomImplementation
{
public:
	QDomImplementationJBridge() : QDomImplementation() {}
	QDomImplementationJBridge(const QDomImplementation& arg1) : QDomImplementation(arg1) {}
	~QDomImplementationJBridge() {QtSupport::qtKeyDeleted(this);}
};


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

JNIEXPORT void JNICALL
Java_org_kde_qt_QDomImplementation_newQDomImplementation__Lorg_kde_qt_QDomImplementation_2(JNIEnv *env, jobject obj, jobject arg1)
{
	if (QtSupport::getQt(env, obj) == 0) {
		QtSupport::setQt(env, obj, new QDomImplementationJBridge((QDomImplementation&) *(QDomImplementation *) QtSupport::getQt(env, arg1)));
		QtSupport::setObjectForQtKey(env, obj, QtSupport::getQt(env, obj));
	}
	return;
}

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

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QDomImplementation_hasFeature(JNIEnv *env, jobject obj, jstring feature, jstring version)
{
static QString * _qstring_version = 0;
static QString * _qstring_feature = 0;
	return (jboolean) ((QDomImplementationJBridge*) QtSupport::getQt(env, obj))->hasFeature((QString&) * (QString *) QtSupport::toQString(env, feature, &_qstring_feature), (QString&) * (QString *) QtSupport::toQString(env, version, &_qstring_version));
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomImplementation_createDocumentType(JNIEnv *env, jobject obj, jstring qName, jstring publicId, jstring systemId)
{
static QString * _qstring_systemId = 0;
static QString * _qstring_publicId = 0;
static QString * _qstring_qName = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)new  QDomDocumentType (((QDomImplementationJBridge*) QtSupport::getQt(env, obj))->createDocumentType((QString&) * (QString *) QtSupport::toQString(env, qName, &_qstring_qName), (QString&) * (QString *) QtSupport::toQString(env, publicId, &_qstring_publicId), (QString&) * (QString *) QtSupport::toQString(env, systemId, &_qstring_systemId))), "org.kde.qt.QDomDocumentType", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomImplementation_createDocument(JNIEnv *env, jobject obj, jstring nsURI, jstring qName, jobject doctype)
{
static QString * _qstring_qName = 0;
static QString * _qstring_nsURI = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)new  QDomDocument (((QDomImplementationJBridge*) QtSupport::getQt(env, obj))->createDocument((QString&) * (QString *) QtSupport::toQString(env, nsURI, &_qstring_nsURI), (QString&) * (QString *) QtSupport::toQString(env, qName, &_qstring_qName), (QDomDocumentType&) *(QDomDocumentType *) QtSupport::getQt(env, doctype))), "org.kde.qt.QDomDocument", TRUE);
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QDomImplementation_isNull(JNIEnv *env, jobject obj)
{
	return (jboolean) ((QDomImplementationJBridge*) QtSupport::getQt(env, obj))->isNull();
}

