Mtx::SaxContext Class Reference

#include <MTXml/MTSax.h>

List of all members.


Detailed Description

SAX parser context wrapper class.

This class wraps the mtxSax set of functions. To use it, you need to inherit and implement the MtxListener and SaxListener interfaces.


Public Member Functions

 SaxContext (void)
 ~SaxContext (void)
void start (SaxListener &newSaxListener, MtxListener &newMtxListener)
bool feed (char *data)
bool feedProcess (char *data)
void stop (void)
bool isStarted (void) const


Constructor & Destructor Documentation

Mtx::SaxContext::SaxContext void   ) 
 

Constructor.

Mtx::SaxContext::~SaxContext void   ) 
 

Destructor.


Member Function Documentation

void Mtx::SaxContext::start SaxListener newSaxListener,
MtxListener newMtxListener
 

Initializes this parser context using the specified callback interfaces. The SAX interface receives XML data, while the MTXml interface handles buffer management.

Parameters:
newSaxListener The SAX interface implementation to use.
newMtxListener The MTXml interface implementation to use.
See also:
mtxSaxStart

bool Mtx::SaxContext::feed char *  data  ) 
 

Feeds some data into this parser context. The context must already be started. Any remaining data is passed to the MtxListener interface.

Parameters:
data The (null-terminated) data to feed into the parser.
Note:
You must not call this method from within a callback.
See also:
mtxSaxFeed

bool Mtx::SaxContext::feedProcess char *  data  ) 
 

Feeds some data into this parser context, with UTF-8 to Latin-1 conversion. The context must already be started. Any remaining data is passed to the MtxListener interface.

Parameters:
data The (null-terminated) data to feed into the parser.
Note:
You must not call this method from within a callback.
See also:
mtxSaxFeedProcess

void Mtx::SaxContext::stop void   ) 
 

De-initializes this parser context if it was previously initialized.

See also:
mtxSaxStop

bool Mtx::SaxContext::isStarted void   )  const
 

Returns:
true if this parser context is initialized, otherwise false.


Generated on Sat Feb 13 00:15:40 2010 for MoSync 2 beta 1 by  doxygen 1.4.6-NO