Crazy Eddie's GUI System  0.8.6
CEGUI::XercesParser Class Reference

Implementation of XMLParser using Xerces-C++. More...

+ Inheritance diagram for CEGUI::XercesParser:
+ Collaboration diagram for CEGUI::XercesParser:

Public Member Functions

void parseXML (XMLHandler &handler, const RawDataContainer &source, const String &schemaName)
 abstract method which initiates parsing of an XML. More...
 
- Public Member Functions inherited from CEGUI::XMLParser
 XMLParser (void)
 XMLParser base class constructor.
 
virtual ~XMLParser (void)
 XMLParser base class destructor.
 
bool initialise (void)
 Initialises the XMLParser module ready for use. More...
 
void cleanup (void)
 Cleans up the XMLParser module after use. More...
 
virtual void parseXMLFile (XMLHandler &handler, const String &filename, const String &schemaName, const String &resourceGroup)
 convenience method which initiates parsing of an XML file. More...
 
virtual void parseXMLString (XMLHandler &handler, const String &source, const String &schemaName)
 convenience method which initiates parsing of an XML source from string. More...
 
const StringgetIdentifierString () const
 Return identification string for the XML parser module. If the internal id string has not been set by the XML parser module creator, a generic string of "Unknown XML parser" will be returned. More...
 
- Public Member Functions inherited from CEGUI::PropertySet
 PropertySet (void)
 Constructs a new PropertySet object.
 
virtual ~PropertySet (void)
 Destructor for PropertySet objects.
 
void addProperty (Property *property)
 Adds a new Property to the PropertySet. More...
 
void removeProperty (const String &name)
 Removes a Property from the PropertySet. More...
 
PropertygetPropertyInstance (const String &name) const
 Retrieves a property instance (that was previously added) More...
 
void clearProperties (void)
 Removes all Property objects from the PropertySet.
 
bool isPropertyPresent (const String &name) const
 Checks to see if a Property with the given name is in the PropertySet. More...
 
const StringgetPropertyHelp (const String &name) const
 Return the help text for the specified Property. More...
 
String getProperty (const String &name) const
 Gets the current value of the specified Property. More...
 
template<typename T >
PropertyHelper< T >::return_type getProperty (const String &name) const
 Gets the current value of the specified Property. More...
 
void setProperty (const String &name, const String &value)
 Sets the current value of a Property. More...
 
template<typename T >
void setProperty (const String &name, typename PropertyHelper< T >::pass_type value)
 Sets the current value of a Property. More...
 
bool isPropertyDefault (const String &name) const
 Returns whether a Property is at it's default value. More...
 
String getPropertyDefault (const String &name) const
 Returns the default value of a Property as a String. More...
 
PropertyIterator getPropertyIterator (void) const
 Return a PropertySet::PropertyIterator object to iterate over the available Properties.
 

Static Public Member Functions

static void populateAttributesBlock (const XERCES_CPP_NAMESPACE::Attributes &src, XMLAttributes &dest)
 Populate the CEGUI::XMLAttributes object with attribute data from the Xerces attributes block.
 
static String transcodeXmlCharToString (const XMLCh *const xmlch_str, unsigned int length)
 Return a CEGUI::String containing the Xerces XMLChar string data in xmlch_str. More...
 
static void setSchemaDefaultResourceGroup (const String &resourceGroup)
 Sets the default resource group to be used when loading schema files. More...
 
static const StringgetSchemaDefaultResourceGroup ()
 Returns the default resource group used when loading schema files. More...
 

Protected Member Functions

bool initialiseImpl (void)
 abstract method which initialises the XMLParser ready for use. More...
 
void cleanupImpl (void)
 abstract method which cleans up the XMLParser after use. More...
 

Static Protected Member Functions

static void initialiseSchema (XERCES_CPP_NAMESPACE::SAX2XMLReader *reader, const String &schemaName)
 
static XERCES_CPP_NAMESPACE::SAX2XMLReader * createReader (XERCES_CPP_NAMESPACE::DefaultHandler &handler)
 
static void doParse (XERCES_CPP_NAMESPACE::SAX2XMLReader *parser, const RawDataContainer &source)
 

Static Protected Attributes

static String d_defaultSchemaResourceGroup
 holds the default resource group ID for loading schemas.
 
static XercesParserProperties::SchemaDefaultResourceGroup s_schemaDefaultResourceGroupProperty
 Property for accessing the default schema resource group ID.
 

Additional Inherited Members

- Public Types inherited from CEGUI::PropertySet
typedef ConstMapIterator< PropertyRegistry > PropertyIterator
 
- Protected Attributes inherited from CEGUI::XMLParser
String d_identifierString
 String that holds some id information about the module.
 

Detailed Description

Implementation of XMLParser using Xerces-C++.

Member Function Documentation

void CEGUI::XercesParser::cleanupImpl ( void  )
protectedvirtual

abstract method which cleans up the XMLParser after use.

Returns
Nothing.

Implements CEGUI::XMLParser.

static const String& CEGUI::XercesParser::getSchemaDefaultResourceGroup ( )
inlinestatic

Returns the default resource group used when loading schema files.

Returns
String describing the default resource group identifier..
bool CEGUI::XercesParser::initialiseImpl ( void  )
protectedvirtual

abstract method which initialises the XMLParser ready for use.

Returns
  • true if the module initialised successfully.
  • false if the module initialisation failed.

Implements CEGUI::XMLParser.

void CEGUI::XercesParser::parseXML ( XMLHandler handler,
const RawDataContainer source,
const String schemaName 
)
virtual

abstract method which initiates parsing of an XML.

Parameters
handlerXMLHandler based object which will process the XML elements.
sourceRawDataContainer containing the data to parse
schemaNameString object holding the name of the XML schema file to use for validating the XML. Note that whether this is used or not is dependant upon the XMLParser in use.
Returns
Nothing.

Implements CEGUI::XMLParser.

static void CEGUI::XercesParser::setSchemaDefaultResourceGroup ( const String resourceGroup)
inlinestatic

Sets the default resource group to be used when loading schema files.

Parameters
resourceGroupString describing the default resource group identifier to be used.
Returns
Nothing.
static String CEGUI::XercesParser::transcodeXmlCharToString ( const XMLCh *const  xmlch_str,
unsigned int  length 
)
static

Return a CEGUI::String containing the Xerces XMLChar string data in xmlch_str.

Parameters
xmlch_strThe string data.
lengthThe size of the string data. It can be computed using
XMLString::stringLen(xmlch_str)