MlpParser Class Reference

Main parser class. More...

#include <MlpLib.hpp>

Collaboration diagram for MlpParser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MlpParser ()
 ~MlpParser ()
void configure (const MlpConfig *config)
void init ()
void parse (MlpMessage *inMsg, const std::string &msg) const

Detailed Description

Main parser class.

This is main class that implements MLP parser. It wraps around the Xerces parser an MlpHandler and provides simple interface. Use this class to process MLP messages. MlpParser is not synchronized but it does not use any global variables. That means you can use more MlpParsers simultaneously. Use one or more parsers in one thread or more parsers in more threads. Because it is not synchronized do not access one parser from more threads simultaneously.


Constructor & Destructor Documentation

MlpParser::MlpParser (  ) 

Constructor

Constructor

Creates SAX parser using Xerces-c++.

MlpParser::~MlpParser (  ) 

Destructor

Destructor

Deletes objects allocated in constructor, initialization or configuration.


Member Function Documentation

void MlpParser::configure ( const MlpConfig config  ) 

Configuration

Configuration

Configures MLP parser. Use configure() before init() method!

Parameters:
config Pinter to the configuration information.
void MlpParser::init (  ) 

Initialization

Initialization.

Initializes MLP parser to the ready state. From now-on the parser is ready. Use init() method after configure() method!

void MlpParser::parse ( MlpMessage inMsg,
const std::string &  msg 
) const

Main parsing method

Main parsing method.

This is main method you want to call if you want to process MLP message. Message is passed to this method as a reference to the standard string containing a message. InMsg is a pointer to the empty MlpMessage object that is passed to the parser by user. Empty message will be filled with useful data form the msg string.

Parameters:
inMsg Empty MlpMessage that will be filled with parsed info.
msg Reference to the string containing a data for parsing.
Exceptions:
MlpException Throws exception when no MlpMessage is passed to the member function
MlpOutOfMemoryException Throws exception when there is not enough memory
MlpParseException Throws the exception whenever there is problem during parsing of the message.
MlpXmlException Throws exception whenever there is problem during processing of the message. It could be message problem with accesing the DTD files for example
... Throws undefined exception.

The documentation for this class was generated from the following files:

Generated on Tue Jan 19 10:25:57 2010 for "MLP Library" by  doxygen 1.6.1