27 #ifndef _CEGUIXercesParser_h_
28 #define _CEGUIXercesParser_h_
30 #include "../../XMLParser.h"
31 #include "CEGUI/XMLParserModules/Xerces/XMLParserProperties.h"
34 # pragma warning(push)
35 # pragma warning(disable : 4251)
38 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
39 # ifdef CEGUIXERCESPARSER_EXPORTS
40 # define CEGUIXERCESPARSER_API __declspec(dllexport)
42 # define CEGUIXERCESPARSER_API __declspec(dllimport)
45 # define CEGUIXERCESPARSER_API
50 #include <xercesc/framework/MemBufInputSource.hpp>
51 #include <xercesc/util/PlatformUtils.hpp>
52 #include <xercesc/util/TransService.hpp>
53 #include <xercesc/util/XMLString.hpp>
54 #include <xercesc/sax2/Attributes.hpp>
55 #include <xercesc/sax2/DefaultHandler.hpp>
56 #include <xercesc/sax2/SAX2XMLReader.hpp>
57 #include <xercesc/sax2/XMLReaderFactory.hpp>
69 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
70 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname);
71 #if _XERCES_VERSION >= 30000
72 void characters(
const XMLCh*
const chars,
const XMLSize_t length);
74 void characters (
const XMLCh *
const chars,
const unsigned int length);
76 void warning (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
77 void error (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
78 void fatalError (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
102 static void populateAttributesBlock(
const XERCES_CPP_NAMESPACE::Attributes& src,
XMLAttributes& dest);
115 static String transcodeXmlCharToString(
const XMLCh*
const xmlch_str,
unsigned int length);
128 { d_defaultSchemaResourceGroup = resourceGroup; }
138 {
return d_defaultSchemaResourceGroup; }
141 static void initialiseSchema(XERCES_CPP_NAMESPACE::SAX2XMLReader* reader,
const String& schemaName);
142 static XERCES_CPP_NAMESPACE::SAX2XMLReader* createReader(XERCES_CPP_NAMESPACE::DefaultHandler& handler);
143 static void doParse(XERCES_CPP_NAMESPACE::SAX2XMLReader* parser,
const RawDataContainer& source);
146 bool initialiseImpl(
void);
147 void cleanupImpl(
void);
158 #if defined(_MSC_VER)
159 # pragma warning(pop)
162 #endif // end of guard _CEGUIXercesParser_h_
static void setSchemaDefaultResourceGroup(const String &resourceGroup)
Sets the default resource group to be used when loading schema files.
Definition: XMLParserModules/Xerces/XMLParser.h:127
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
static String d_defaultSchemaResourceGroup
holds the default resource group ID for loading schemas.
Definition: XMLParserModules/Xerces/XMLParser.h:150
Definition: XMLHandler.h:36
Definition: XMLParserModules/Xerces/XMLParser.h:62
XMLHandler & d_handler
This is the 'real' CEGUI based handler which we interface via.
Definition: XMLParserModules/Xerces/XMLParser.h:81
static XercesParserProperties::SchemaDefaultResourceGroup s_schemaDefaultResourceGroupProperty
Property for accessing the default schema resource group ID.
Definition: XMLParserModules/Xerces/XMLParser.h:153
static const String & getSchemaDefaultResourceGroup()
Returns the default resource group used when loading schema files.
Definition: XMLParserModules/Xerces/XMLParser.h:137
Implementation of XMLParser using Xerces-C++.
Definition: XMLParserModules/Xerces/XMLParser.h:88
Class used as the databuffer for loading files throughout the library.
Definition: DataContainer.h:42
Class representing a block of attributes associated with an XML element.
Definition: XMLAttributes.h:46
Property to access the resource group used to load .xsd schema files.
Definition: XMLParserProperties.h:47
This is an abstract class that is used by CEGUI to interface with XML parser libraries.
Definition: XMLParser.h:41
String class used within the GUI system.
Definition: String.h:62