/***************************************************************************
                            QXmlContentHandler.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_QXmlContentHandler.h>
#include <qtobjc/QXmlContentHandler.h>
#include <qtobjc/QXmlLocator.h>
#include <qtobjc/QXmlAttributes.h>

@implementation  QXmlContentHandler


- setDocumentLocator: (QXmlLocator*)locator
{
	qt_QXmlContentHandler_setDocumentLocator((qt_QXmlContentHandler *)[self qt], (qt_QXmlLocator*) [locator qt]);
	return self;
}

- (BOOL) startDocument
{
	return (BOOL) qt_QXmlContentHandler_startDocument((qt_QXmlContentHandler *)[self qt]);
}

- (BOOL) endDocument
{
	return (BOOL) qt_QXmlContentHandler_endDocument((qt_QXmlContentHandler *)[self qt]);
}

- (BOOL) startPrefixMapping: (NSString *)prefix uri: (NSString *)uri
{
static qt_QString * _qstring_uri = 0L;
static qt_QString * _qstring_prefix = 0L;
	return (BOOL) qt_QXmlContentHandler_startPrefixMapping((qt_QXmlContentHandler *)[self qt], (qt_QString *) [prefix toQString: &_qstring_prefix], (qt_QString *) [uri toQString: &_qstring_uri]);
}

- (BOOL) endPrefixMapping: (NSString *)prefix
{
static qt_QString * _qstring_prefix = 0L;
	return (BOOL) qt_QXmlContentHandler_endPrefixMapping((qt_QXmlContentHandler *)[self qt], (qt_QString *) [prefix toQString: &_qstring_prefix]);
}

- (BOOL) startElement: (NSString *)namespaceURI localName: (NSString *)localName qName: (NSString *)qName atts: (QXmlAttributes*)atts
{
static qt_QString * _qstring_qName = 0L;
static qt_QString * _qstring_localName = 0L;
static qt_QString * _qstring_namespaceURI = 0L;
	return (BOOL) qt_QXmlContentHandler_startElement((qt_QXmlContentHandler *)[self qt], (qt_QString *) [namespaceURI toQString: &_qstring_namespaceURI], (qt_QString *) [localName toQString: &_qstring_localName], (qt_QString *) [qName toQString: &_qstring_qName], (qt_QXmlAttributes*) [atts qt]);
}

- (BOOL) endElement: (NSString *)namespaceURI localName: (NSString *)localName qName: (NSString *)qName
{
static qt_QString * _qstring_qName = 0L;
static qt_QString * _qstring_localName = 0L;
static qt_QString * _qstring_namespaceURI = 0L;
	return (BOOL) qt_QXmlContentHandler_endElement((qt_QXmlContentHandler *)[self qt], (qt_QString *) [namespaceURI toQString: &_qstring_namespaceURI], (qt_QString *) [localName toQString: &_qstring_localName], (qt_QString *) [qName toQString: &_qstring_qName]);
}

- (BOOL) characters: (NSString *)ch
{
static qt_QString * _qstring_ch = 0L;
	return (BOOL) qt_QXmlContentHandler_characters((qt_QXmlContentHandler *)[self qt], (qt_QString *) [ch toQString: &_qstring_ch]);
}

- (BOOL) ignorableWhitespace: (NSString *)ch
{
static qt_QString * _qstring_ch = 0L;
	return (BOOL) qt_QXmlContentHandler_ignorableWhitespace((qt_QXmlContentHandler *)[self qt], (qt_QString *) [ch toQString: &_qstring_ch]);
}

- (BOOL) processingInstruction: (NSString *)target data: (NSString *)data
{
static qt_QString * _qstring_data = 0L;
static qt_QString * _qstring_target = 0L;
	return (BOOL) qt_QXmlContentHandler_processingInstruction((qt_QXmlContentHandler *)[self qt], (qt_QString *) [target toQString: &_qstring_target], (qt_QString *) [data toQString: &_qstring_data]);
}

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

- (NSString *) errorString
{
static qt_QString * _qstring = 0L;
	_qstring = qt_QXmlContentHandler_errorString((qt_QXmlContentHandler *)[self qt]);
	return [NSString fromQString: _qstring];
}
- (void *) qt
{
	return _qt;
}

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

- (BOOL) allocatedInObjcWorld
{
	return _allocatedInObjcWorld;
}

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


@end
