MlpLib.hpp File Reference

Main header file. More...

#include <iostream>
#include <sstream>
#include <string>
#include <xercesc/sax2/SAX2XMLReader.hpp>
#include <xercesc/sax2/XMLReaderFactory.hpp>
#include <xercesc/sax2/DefaultHandler.hpp>
#include <xercesc/framework/MemBufInputSource.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
#include <libmlp-cpp/MlpDtdResolver.hpp>
#include <libmlp-cpp/MlpXmlString.hpp>
#include <libmlp-cpp/MlpParseHandlers.hpp>
#include <libmlp-cpp/MlpErrorHandler.hpp>
#include <libmlp-cpp/MlpLog.hpp>
#include <libmlp-cpp/MlpMessage.hpp>
#include <libmlp-cpp/MlpConfig.hpp>
#include <libmlp-cpp/MlpXmlException.hpp>
Include dependency graph for MlpLib.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  MlpParser
 Main parser class. More...

Defines

#define MLP_LIB_CPP_INIT
 Macro to initialize the environment.
#define MLP_LIB_CPP_TERMINATE
 Macro to clean the environment.

Detailed Description

Main header file.

This file contains MlpParser class declaration.

Author:
Petr Vláčil

Define Documentation

#define MLP_LIB_CPP_INIT
Value:
do \
    { \
        try { \
            xercesc::XMLPlatformUtils::Initialize(); \
        } \
        catch (const xercesc::XMLException& e){ \
            std::ostringstream error; \
            error << "MlpXmlException: Error during Xerces-c initialization! :\n" \
                  << "MlpXmlException: Exception message is: \n" \
                  << "MlpXmlException:    " << MlpXmlString( e.getMessage() ) ; \
            MLP_LOG_ERROR( error.str() ); \
            throw MlpXmlException( error.str() ); \
        } \
    } \
    while ( false )

Macro to initialize the environment.

This macro should be used at the beginning of program before creating any MLP parser. It initiates Xerces environment. It is better not to use this macro in constructor as it throws the MlpXmlException.

Exceptions:
MlpXmlException 
#define MLP_LIB_CPP_TERMINATE
Value:
do \
    { \
        try { \
            xercesc::XMLPlatformUtils::Terminate(); \
        } \
        catch ( const xercesc::XMLException& e ) { \
            std::ostringstream error; \
            error << "MlpXmlException: Error during Xerces-c termination! :\n" \
                  << "MlpXmlException: Exception message is: \n" \
                  << "MlpXmlException:    " << MlpXmlString( e.getMessage() ) ; \
            MLP_LOG_ERROR( error.str() ); \
            throw MlpXmlException( error.str() ); \
        } \
    } \
    while ( false ) \

Macro to clean the environment.

This macro should be used at the end of program to clean things up. It cleans Xerces environment. It is better not to use this macro in destructors as it throws the MlpXmlException. Destructors should never throw the exceptions.

Exceptions:
MlpXmlException 

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