Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

XmlParserBase Class Reference

Base class for all XML parsers. More...

#include <xmlparserbase.h>

Inheritance diagram for XmlParserBase:

SAXBase UserOfTextCodec XmlParser List of all members.

Public Methods

 XmlParserBase (void)
 A constructor. More...

 XmlParserBase (const XmlChar *encoding)
 A constructor with an encoding. More...

virtual ~XmlParserBase (void)
 A destructor. More...

virtual void setInputDevice (IODevice *dev)
 Set input device. More...

virtual void setXmlModel (XmlModelBase *model)
 Set XML model. More...

virtual long parse (void) throw (ExaltParserException, ExaltEncodingException, ExaltIOException)
 Parse XML data stream. More...

virtual long parsePush (const char *data, int length, bool isFinal) throw (ExaltParserException, ExaltEncodingException, ExaltIOException)
 Parse XML data in a buffer (PUSH parser). More...


Protected Methods

void init_ (void)
 Initialize the parser. More...


Protected Attributes

IODeviceinputDevice
 The input device.

XmlModelBasexmlModel
 The XML model.


Detailed Description

Base class for all XML parsers.

This class implements a simple Expat-based XML parser. It defines all the basic handlers (which are mostly doing nothing) and serves as a base class for inhering of new parsers.

Definition at line 41 of file xmlparserbase.h.


Constructor & Destructor Documentation

XmlParserBase::XmlParserBase void    [inline]
 

A constructor.

Calls init_().

Definition at line 49 of file xmlparserbase.h.

References init_.

XmlParserBase::XmlParserBase const XmlChar *    encoding [inline]
 

A constructor with an encoding.

Parameters:
encoding  The name of the encoding (IGNORED).

Definition at line 61 of file xmlparserbase.h.

References init_, and XmlChar.

virtual XmlParserBase::~XmlParserBase void    [inline, virtual]
 

A destructor.

Does nothing.

Definition at line 72 of file xmlparserbase.h.


Member Function Documentation

void XmlParserBase::init_ void    [inline, protected]
 

Initialize the parser.

Initializes the member variables of the class.

Definition at line 132 of file xmlparserbase.h.

Referenced by XmlParserBase.

virtual long XmlParserBase::parse void    throw (ExaltParserException, ExaltEncodingException, ExaltIOException) [inline, virtual]
 

Parse XML data stream.

Return values:
0  Error during parsing.
Returns:
Number of parsed bytes otherwise.

Reimplemented in XmlParser.

Definition at line 101 of file xmlparserbase.h.

virtual long XmlParserBase::parsePush const char *    data,
int    length,
bool    isFinal
throw (ExaltParserException, ExaltEncodingException, ExaltIOException) [inline, virtual]
 

Parse XML data in a buffer (PUSH parser).

Always returns true.

Return values:
0  Error during parsing.
Returns:
Number of parsed bytes otherwise.

Reimplemented in XmlParser.

Definition at line 114 of file xmlparserbase.h.

virtual void XmlParserBase::setInputDevice IODevice   dev [inline, virtual]
 

Set input device.

Sets an input device for the parser. XML data stream is supposed to come from this device.

Parameters:
dev  Pointer to the input device.

Definition at line 81 of file xmlparserbase.h.

References inputDevice.

Referenced by XmlCodec::encode.

virtual void XmlParserBase::setXmlModel XmlModelBase   model [inline, virtual]
 

Set XML model.

All XML events (NOT SAX events which are handled by the parser itself) that are generated during parsing, are sent to this model.

Parameters:
model  Pointer to the XML model.
See also:
XmlModelEvent , XmlModel

Definition at line 93 of file xmlparserbase.h.

References xmlModel.

Referenced by XmlCodec::encode, and XmlCodec::initializePushCoder.


The documentation for this class was generated from the following file:
Generated on Wed Feb 5 10:43:07 2003 for Exalt by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002