/***************************************************************************
                            QXmlParseException.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_QXmlParseException.h>
#include <qtobjc/QXmlParseException.h>

@implementation  QXmlParseException

- (void *) qt
{
	return _qt;
}

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

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

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


- initWithText: (NSString *)name c: (int)c l: (int)l p: (NSString *)p s: (NSString *)s
{
static qt_QString * _qstring_s = 0L;
static qt_QString * _qstring_p = 0L;
static qt_QString * _qstring_name = 0L;
	if ([self qt] == 0L) {
		[self setQt: qt_new_QXmlParseException((qt_QString *) [name toQString: &_qstring_name], (int)c, (int)l, (qt_QString *) [p toQString: &_qstring_p], (qt_QString *) [s toQString: &_qstring_s])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

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

- (int) columnNumber
{
	return (int) qt_QXmlParseException_columnNumber((qt_QXmlParseException *)[self qt]);
}

- (int) lineNumber
{
	return (int) qt_QXmlParseException_lineNumber((qt_QXmlParseException *)[self qt]);
}

- (NSString *) publicId
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QXmlParseException_publicId((qt_QXmlParseException *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (NSString *) systemId
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QXmlParseException_systemId((qt_QXmlParseException *)[self qt]);
	return [NSString fromQString: _qstring];
}

- (NSString *) message
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QXmlParseException_message((qt_QXmlParseException *)[self qt]);
	return [NSString fromQString: _qstring];
}

@end
