/***************************************************************************
                            QXmlReader.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_QXmlReader.h>
#include <qtobjc/QXmlReader.h>

@implementation  QXmlReader

- (void *) qt
{
	return _qt;
}

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

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

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


- (BOOL) feature: (NSString *)name ok: (int*)ok
{
static qt_QString * _qstring_name = 0L;
	return (BOOL) qt_QXmlReader_feature((qt_QXmlReader *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (int*)ok);
}

- (BOOL) feature: (NSString *)name 
{
static qt_QString * _qstring_name = 0L;
	return (BOOL) qt_QXmlReader_feature((qt_QXmlReader *)[self qt], (qt_QString *) [name toQString: &_qstring_name], 0);
}

- setFeature: (NSString *)name value: (BOOL)value
{
static qt_QString * _qstring_name = 0L;
	qt_QXmlReader_setFeature((qt_QXmlReader *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (int)value);
	return self;
}

- (BOOL) hasFeature: (NSString *)name
{
static qt_QString * _qstring_name = 0L;
	return (BOOL) qt_QXmlReader_hasFeature((qt_QXmlReader *)[self qt], (qt_QString *) [name toQString: &_qstring_name]);
}

- (void*) property: (NSString *)name ok: (int*)ok
{
static qt_QString * _qstring_name = 0L;
	return (void*) qt_QXmlReader_property((qt_QXmlReader *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (int*)ok);
}

- (void*) property: (NSString *)name 
{
static qt_QString * _qstring_name = 0L;
	return (void*) qt_QXmlReader_property((qt_QXmlReader *)[self qt], (qt_QString *) [name toQString: &_qstring_name], 0);
}

- setProperty: (NSString *)name value: (void*)value
{
static qt_QString * _qstring_name = 0L;
	qt_QXmlReader_setProperty((qt_QXmlReader *)[self qt], (qt_QString *) [name toQString: &_qstring_name], (void*)value);
	return self;
}

- (BOOL) hasProperty: (NSString *)name
{
static qt_QString * _qstring_name = 0L;
	return (BOOL) qt_QXmlReader_hasProperty((qt_QXmlReader *)[self qt], (qt_QString *) [name toQString: &_qstring_name]);
}

- setEntityResolver: (QXmlEntityResolver*)handler
{
	qt_QXmlReader_setEntityResolver((qt_QXmlReader *)[self qt], (qt_QXmlEntityResolver*) [handler qt]);
	return self;
}

- (QXmlEntityResolver*) entityResolver
{
	return (QXmlEntityResolver*) [QtSupport objectForQtKey: qt_QXmlReader_entityResolver((qt_QXmlReader *)[self qt]) withClass: [QXmlEntityResolver class] allocatedInObjcWorld: YES];
}

- setDTDHandler: (QXmlDTDHandler*)handler
{
	qt_QXmlReader_setDTDHandler((qt_QXmlReader *)[self qt], (qt_QXmlDTDHandler*) [handler qt]);
	return self;
}

- (QXmlDTDHandler*) DTDHandler
{
	return (QXmlDTDHandler*) [QtSupport objectForQtKey: qt_QXmlReader_DTDHandler((qt_QXmlReader *)[self qt]) withClass: [QXmlDTDHandler class] allocatedInObjcWorld: YES];
}

- setContentHandler: (QXmlContentHandler*)handler
{
	qt_QXmlReader_setContentHandler((qt_QXmlReader *)[self qt], (qt_QXmlContentHandler*) [handler qt]);
	return self;
}

- (QXmlContentHandler*) contentHandler
{
	return (QXmlContentHandler*) [QtSupport objectForQtKey: qt_QXmlReader_contentHandler((qt_QXmlReader *)[self qt]) withClass: [QXmlContentHandler class] allocatedInObjcWorld: YES];
}

- setErrorHandler: (QXmlErrorHandler*)handler
{
	qt_QXmlReader_setErrorHandler((qt_QXmlReader *)[self qt], (qt_QXmlErrorHandler*) [handler qt]);
	return self;
}

- (QXmlErrorHandler*) errorHandler
{
	return (QXmlErrorHandler*) [QtSupport objectForQtKey: qt_QXmlReader_errorHandler((qt_QXmlReader *)[self qt]) withClass: [QXmlErrorHandler class] allocatedInObjcWorld: YES];
}

- setLexicalHandler: (QXmlLexicalHandler*)handler
{
	qt_QXmlReader_setLexicalHandler((qt_QXmlReader *)[self qt], (qt_QXmlLexicalHandler*) [handler qt]);
	return self;
}

- (QXmlLexicalHandler*) lexicalHandler
{
	return (QXmlLexicalHandler*) [QtSupport objectForQtKey: qt_QXmlReader_lexicalHandler((qt_QXmlReader *)[self qt]) withClass: [QXmlLexicalHandler class] allocatedInObjcWorld: YES];
}

- setDeclHandler: (QXmlDeclHandler*)handler
{
	qt_QXmlReader_setDeclHandler((qt_QXmlReader *)[self qt], (qt_QXmlDeclHandler*) [handler qt]);
	return self;
}

- (QXmlDeclHandler*) declHandler
{
	return (QXmlDeclHandler*) [QtSupport objectForQtKey: qt_QXmlReader_declHandler((qt_QXmlReader *)[self qt]) withClass: [QXmlDeclHandler class] allocatedInObjcWorld: YES];
}

- (BOOL) parse: (QXmlInputSource*)input
{
	return (BOOL) qt_QXmlReader_parse((qt_QXmlReader *)[self qt], (qt_QXmlInputSource*) [input qt]);
}

//- (BOOL) parse: (QXmlInputSource*)input
//{
//	return (BOOL) qt_QXmlReader_parse1((qt_QXmlReader *)[self qt], (qt_QXmlInputSource*) [input qt]);
//}

@end
