arabica/include/SAX/ParserConfig.hpp

86 lines
1.6 KiB
C++
Raw Normal View History

2006-09-12 23:21:48 +02:00
#ifndef ARABICA_PARSERCONFIG_H
#define ARABICA_PARSERCONFIG_H
#ifdef USE_LIBXML2
2007-09-05 00:55:47 +02:00
#include <SAX/wrappers/saxlibxml2.hpp>
2006-09-12 23:21:48 +02:00
#undef DEF_SAX_P
#define DEF_SAX_P libxml2_wrapper
#ifdef _MSC_VER
#pragma message("Including libxml2")
2007-07-19 19:01:08 +02:00
#pragma comment(lib, "libxml2.lib")
2006-09-12 23:21:48 +02:00
#endif
#endif
#ifdef USE_MSXML
#ifndef _MSC_VER
#error "Can only use MSXML on Windows"
#endif
#pragma message("Including MSXML")
2007-09-05 00:55:47 +02:00
#include <SAX/wrappers/saxmsxml2.hpp>
2006-09-12 23:21:48 +02:00
#undef DEF_SAX_P
#define DEF_SAX_P msxml2_wrapper
#endif
#ifdef USE_XERCES
2007-09-05 00:55:47 +02:00
#include <SAX/wrappers/saxxerces.hpp>
2006-09-12 23:21:48 +02:00
#undef DEF_SAX_P
#define DEF_SAX_P xerces_wrapper
#ifdef _MSC_VER
#pragma message("Including Xerces")
2007-01-02 12:32:48 +01:00
#ifdef _DEBUG
#pragma comment(lib, "xerces-c_2D.lib")
#else
2006-09-12 23:21:48 +02:00
#pragma comment(lib, "xerces-c_2.lib")
#endif
#endif
2007-01-02 12:32:48 +01:00
#endif
2006-09-12 23:21:48 +02:00
#ifdef USE_GARDEN
#ifdef _MSC_VER
#pragma message("Including Garden")
#endif
2007-09-05 00:55:47 +02:00
#include <SAX/parsers/saxgarden.hpp>
2006-09-12 23:21:48 +02:00
#undef DEF_SAX_P
#define DEF_SAX_P Garden
#endif
#ifdef USE_EXPAT
2007-09-05 00:55:47 +02:00
#include <SAX/wrappers/saxexpat.hpp>
2006-09-12 23:21:48 +02:00
#undef DEF_SAX_P
#define DEF_SAX_P expat_wrapper
#ifdef _MSC_VER
#pragma message("Including Expat")
#ifndef XML_STATIC
2006-09-12 23:21:48 +02:00
#pragma comment(lib, "libexpat.lib")
#else
#pragma comment(lib, "libexpatMT.lib")
#endif
2006-09-12 23:21:48 +02:00
#endif
#endif
#ifdef _MSC_VER
#pragma comment(lib, "wsock32.lib")
#endif
#ifndef NO_DEFAULT_PARSER
#ifdef DEF_SAX_P
2007-09-05 11:49:18 +02:00
namespace Arabica
{
2006-09-12 23:21:48 +02:00
namespace SAX
{
template<class string_type, class T0 = Arabica::nil_t, class T1 = Arabica::nil_t>
2006-09-12 23:21:48 +02:00
class XMLReader : public DEF_SAX_P<string_type, T0, T1> { };
} // namespace SAX
2007-09-05 11:49:18 +02:00
} // namespace Arabica
2006-09-12 23:21:48 +02:00
#else
#error "No default parser defined."
#endif
#endif
#undef DEF_P
#endif