/***************************************************************************
                            QXmlNamespaceSupport.m -  description
                             -------------------
    begin                : Wed Nov 21 12:08:37 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 12:08:37 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.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <qtc/qt_QXmlNamespaceSupport.h>
#include <qtobjc/QXmlNamespaceSupport.h>

@implementation  QXmlNamespaceSupport

- (void *) qt
{
	return _qt;
}

- setQt: (void *) qt
{
	_qt = qt;
	return self;
}

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

- setAllocatedInObjcWorld: (BOOL) yn
{
	_allocatedInObjcWorld = yn;
	return self;
}


- init
{
	if ([self qt] == 0L) {
		[self setQt: qt_new_QXmlNamespaceSupport()];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld]) {
			qt_del_QXmlNamespaceSupport((qt_QXmlNamespaceSupport *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- setPrefix: (NSString *)arg1 string: (NSString *)arg2
{
static qt_QString * _qstring_arg2 = 0L;
static qt_QString * _qstring_arg1 = 0L;
	qt_QXmlNamespaceSupport_setPrefix((qt_QXmlNamespaceSupport *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1], (qt_QString *) [arg2 toQString: &_qstring_arg2]);
	return self;
}

- (NSString *) prefix: (NSString *)arg1
{
static qt_QString * _qstring = 0L;
static qt_QString * _qstring_arg1 = 0L;
	_qstring = qt_QXmlNamespaceSupport_prefix((qt_QXmlNamespaceSupport *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return [NSString fromQString: _qstring];
}

- (NSString *) uri: (NSString *)arg1
{
static qt_QString * _qstring = 0L;
static qt_QString * _qstring_arg1 = 0L;
	_qstring = qt_QXmlNamespaceSupport_uri((qt_QXmlNamespaceSupport *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return [NSString fromQString: _qstring];
}

- splitName: (NSString *)arg1 string: (NSString *)arg2 string: (NSString *)arg3
{
static qt_QString * _qstring_arg3 = 0L;
static qt_QString * _qstring_arg2 = 0L;
static qt_QString * _qstring_arg1 = 0L;
	qt_QXmlNamespaceSupport_splitName((qt_QXmlNamespaceSupport *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1], (qt_QString *) [arg2 toQString: &_qstring_arg2], (qt_QString *) [arg3 toQString: &_qstring_arg3]);
	return self;
}

- processName: (NSString *)arg1 bool: (BOOL)arg2 string: (NSString *)arg3 string: (NSString *)arg4
{
static qt_QString * _qstring_arg4 = 0L;
static qt_QString * _qstring_arg3 = 0L;
static qt_QString * _qstring_arg1 = 0L;
	qt_QXmlNamespaceSupport_processName((qt_QXmlNamespaceSupport *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1], (int)arg2, (qt_QString *) [arg3 toQString: &_qstring_arg3], (qt_QString *) [arg4 toQString: &_qstring_arg4]);
	return self;
}

- (NSArray *) prefixes
{
static qt_QStringList * _qlist = 0L;
	_qlist = qt_QXmlNamespaceSupport_prefixes((qt_QXmlNamespaceSupport *)[self qt]);
	return (NSArray *) [NSMutableArray arrayWithQStringList: _qlist];
}

- (NSArray *) prefixes: (NSString *)arg1
{
static qt_QStringList * _qlist = 0L;
static qt_QString * _qstring_arg1 = 0L;
	_qlist = qt_QXmlNamespaceSupport_prefixes1((qt_QXmlNamespaceSupport *)[self qt], (qt_QString *) [arg1 toQString: &_qstring_arg1]);
	return (NSArray *) [NSMutableArray arrayWithQStringList: _qlist];
}

- pushContext
{
	qt_QXmlNamespaceSupport_pushContext((qt_QXmlNamespaceSupport *)[self qt]);
	return self;
}

- popContext
{
	qt_QXmlNamespaceSupport_popContext((qt_QXmlNamespaceSupport *)[self qt]);
	return self;
}

- reset
{
	qt_QXmlNamespaceSupport_reset((qt_QXmlNamespaceSupport *)[self qt]);
	return self;
}

@end
