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

class QDomNamedNodeMapJBridge : public QDomNamedNodeMap
{
public:
	QDomNamedNodeMapJBridge() : QDomNamedNodeMap() {}
	QDomNamedNodeMapJBridge(const QDomNamedNodeMap& arg1) : QDomNamedNodeMap(arg1) {}
	~QDomNamedNodeMapJBridge() {QtSupport::qtKeyDeleted(this);}
};


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

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

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

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomNamedNodeMap_namedItem(JNIEnv *env, jobject obj, jstring name)
{
static QString * _qstring_name = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QDomNode (((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->namedItem((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name))), "org.kde.qt.QDomNode", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomNamedNodeMap_setNamedItem(JNIEnv *env, jobject obj, jobject newNode)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QDomNode (((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->setNamedItem((QDomNode&) *(QDomNode *) QtSupport::getQt(env, newNode))), "org.kde.qt.QDomNode", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomNamedNodeMap_removeNamedItem(JNIEnv *env, jobject obj, jstring name)
{
static QString * _qstring_name = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QDomNode (((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->removeNamedItem((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name))), "org.kde.qt.QDomNode", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomNamedNodeMap_item(JNIEnv *env, jobject obj, jint index)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QDomNode (((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->item((int) index)), "org.kde.qt.QDomNode", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomNamedNodeMap_namedItemNS(JNIEnv *env, jobject obj, jstring nsURI, jstring localName)
{
static QString * _qstring_localName = 0;
static QString * _qstring_nsURI = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QDomNode (((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->namedItemNS((QString&) * (QString *) QtSupport::toQString(env, nsURI, &_qstring_nsURI), (QString&) * (QString *) QtSupport::toQString(env, localName, &_qstring_localName))), "org.kde.qt.QDomNode", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomNamedNodeMap_setNamedItemNS(JNIEnv *env, jobject obj, jobject newNode)
{
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QDomNode (((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->setNamedItemNS((QDomNode&) *(QDomNode *) QtSupport::getQt(env, newNode))), "org.kde.qt.QDomNode", TRUE);
}

JNIEXPORT jobject JNICALL
Java_org_kde_qt_QDomNamedNodeMap_removeNamedItemNS(JNIEnv *env, jobject obj, jstring nsURI, jstring localName)
{
static QString * _qstring_localName = 0;
static QString * _qstring_nsURI = 0;
	return (jobject) QtSupport::objectForQtKey(env, (void *)new QDomNode (((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->removeNamedItemNS((QString&) * (QString *) QtSupport::toQString(env, nsURI, &_qstring_nsURI), (QString&) * (QString *) QtSupport::toQString(env, localName, &_qstring_localName))), "org.kde.qt.QDomNode", TRUE);
}

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

JNIEXPORT jint JNICALL
Java_org_kde_qt_QDomNamedNodeMap_count(JNIEnv *env, jobject obj)
{
	return (jint) ((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->count();
}

JNIEXPORT jboolean JNICALL
Java_org_kde_qt_QDomNamedNodeMap_contains(JNIEnv *env, jobject obj, jstring name)
{
static QString * _qstring_name = 0;
	return (jboolean) ((QDomNamedNodeMapJBridge*) QtSupport::getQt(env, obj))->contains((QString&) * (QString *) QtSupport::toQString(env, name, &_qstring_name));
}

