diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-06-01 08:48:42 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-06-01 09:24:28 (GMT) |
commit | 2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch) | |
tree | d46294f35150c4f0f43deaf2d31fceaf945ae715 /Swiften/Parser/PlatformXMLParserFactory.cpp | |
download | swift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip swift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2 |
Import.
Diffstat (limited to 'Swiften/Parser/PlatformXMLParserFactory.cpp')
-rw-r--r-- | Swiften/Parser/PlatformXMLParserFactory.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Swiften/Parser/PlatformXMLParserFactory.cpp b/Swiften/Parser/PlatformXMLParserFactory.cpp new file mode 100644 index 0000000..14557d1 --- /dev/null +++ b/Swiften/Parser/PlatformXMLParserFactory.cpp @@ -0,0 +1,28 @@ +#include "Swiften/Parser/PlatformXMLParserFactory.h" + +#include <cassert> + +#ifdef HAVE_SWIFTEN_CONFIG_H +#include "Swiften/config.h" +#endif +#ifdef HAVE_LIBXML +#include "Swiften/Parser/LibXMLParser.h" +#else +#include "Swiften/Parser/ExpatParser.h" +#endif + + +namespace Swift { + +PlatformXMLParserFactory::PlatformXMLParserFactory() { +} + +XMLParser* PlatformXMLParserFactory::createXMLParser(XMLParserClient* client) { +#ifdef HAVE_LIBXML + return new LibXMLParser(client); +#else + return new ExpatParser(client); +#endif +} + +} |