mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 19:04:00 +02:00
- stubbed out use of xerces as no code was using it any longer. Xerces is no longer a requirement to build, we have been using rapidxml for a long time now. For now the MACRO: WANT_XERCES will build Xerces support into th egame, but it is still not used. We will likely deprecate xerces from megaglest soon.
This commit is contained in:
@@ -14,8 +14,14 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
#include <map>
|
||||
|
||||
#if defined(WANT_XERCES)
|
||||
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
#include "rapidxml/rapidxml.hpp"
|
||||
#include "data_types.h"
|
||||
#include "leak_dumper.h"
|
||||
@@ -23,6 +29,8 @@
|
||||
using namespace rapidxml;
|
||||
using namespace std;
|
||||
|
||||
#if defined(WANT_XERCES)
|
||||
|
||||
namespace XERCES_CPP_NAMESPACE{
|
||||
class DOMImplementation;
|
||||
class DOMDocument;
|
||||
@@ -38,10 +46,15 @@ namespace XERCES_CPP_NAMESPACE{
|
||||
|
||||
XERCES_CPP_NAMESPACE_USE
|
||||
|
||||
#endif
|
||||
|
||||
namespace Shared { namespace Xml {
|
||||
|
||||
enum xml_engine_parser_type {
|
||||
|
||||
#if defined(WANT_XERCES)
|
||||
XML_XERCES_ENGINE = 0,
|
||||
#endif
|
||||
XML_RAPIDXML_ENGINE = 1
|
||||
} ;
|
||||
|
||||
@@ -52,6 +65,7 @@ class XmlTree;
|
||||
class XmlNode;
|
||||
class XmlAttribute;
|
||||
|
||||
#if defined(WANT_XERCES)
|
||||
// =====================================================
|
||||
// class XmlIo
|
||||
//
|
||||
@@ -93,6 +107,8 @@ public:
|
||||
void save(const string &path, const XmlNode *node);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
class XmlIoRapid {
|
||||
private:
|
||||
static bool initialized;
|
||||
@@ -158,7 +174,14 @@ private:
|
||||
bool hasChildNoSuper(const string& childName) const;
|
||||
|
||||
public:
|
||||
|
||||
#if defined(WANT_XERCES)
|
||||
|
||||
XmlNode(XERCES_CPP_NAMESPACE::DOMNode *node, const std::map<string,string> &mapTagReplacementValues);
|
||||
XERCES_CPP_NAMESPACE::DOMElement *buildElement(XERCES_CPP_NAMESPACE::DOMDocument *document) const;
|
||||
|
||||
#endif
|
||||
|
||||
XmlNode(xml_node<> *node, const std::map<string,string> &mapTagReplacementValues);
|
||||
XmlNode(const string &name);
|
||||
~XmlNode();
|
||||
@@ -186,8 +209,6 @@ public:
|
||||
|
||||
XmlNode *addChild(const string &name, const string text = "");
|
||||
XmlAttribute *addAttribute(const string &name, const string &value, const std::map<string,string> &mapTagReplacementValues);
|
||||
|
||||
XERCES_CPP_NAMESPACE::DOMElement *buildElement(XERCES_CPP_NAMESPACE::DOMDocument *document) const;
|
||||
xml_node<>* buildElement(xml_document<> *document) const;
|
||||
};
|
||||
|
||||
@@ -208,7 +229,13 @@ private:
|
||||
void operator =(XmlAttribute&);
|
||||
|
||||
public:
|
||||
|
||||
#if defined(WANT_XERCES)
|
||||
|
||||
XmlAttribute(XERCES_CPP_NAMESPACE::DOMNode *attribute, const std::map<string,string> &mapTagReplacementValues);
|
||||
|
||||
#endif
|
||||
|
||||
XmlAttribute(xml_attribute<> *attribute, const std::map<string,string> &mapTagReplacementValues);
|
||||
XmlAttribute(const string &name, const string &value, const std::map<string,string> &mapTagReplacementValues);
|
||||
|
||||
|
Reference in New Issue
Block a user