Crazy Eddie's GUI System  0.8.4
CEGUI::XMLParser Class Reference

This is an abstract class that is used by CEGUI to interface with XML parser libraries. More...

Inherits CEGUI::PropertySet, and CEGUI::AllocatedObject< XMLParser >.

Inherited by CEGUI::ExpatParser, CEGUI::LibxmlParser, CEGUI::RapidXMLParser, CEGUI::TinyXMLParser, and CEGUI::XercesParser.

+ Collaboration diagram for CEGUI::XMLParser:

List of all members.

Public Member Functions

 XMLParser (void)
 XMLParser base class constructor.
virtual ~XMLParser (void)
 XMLParser base class destructor.
bool initialise (void)
 Initialises the XMLParser module ready for use.
void cleanup (void)
 Cleans up the XMLParser module after use.
virtual void parseXML (XMLHandler &handler, const RawDataContainer &source, const String &schemaName)=0
 abstract method which initiates parsing of an XML.
virtual void parseXMLFile (XMLHandler &handler, const String &filename, const String &schemaName, const String &resourceGroup)
 convenience method which initiates parsing of an XML file.
virtual void parseXMLString (XMLHandler &handler, const String &source, const String &schemaName)
 convenience method which initiates parsing of an XML source from string.
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.

Protected Member Functions

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

Protected Attributes

String d_identifierString
 String that holds some id information about the module.

Detailed Description

This is an abstract class that is used by CEGUI to interface with XML parser libraries.


Member Function Documentation

void CEGUI::XMLParser::cleanup ( void  )

Cleans up the XMLParser module after use.

Note that this calls the protected abstract method 'cleanupImpl', which should be provided in your implementation to perform any required cleanup.

Returns:
Nothing.
virtual void CEGUI::XMLParser::cleanupImpl ( void  ) [protected, pure virtual]

abstract method which cleans up the XMLParser after use.

Returns:
Nothing.

Implemented in CEGUI::XercesParser, CEGUI::ExpatParser, CEGUI::LibxmlParser, CEGUI::TinyXMLParser, and CEGUI::RapidXMLParser.

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.

Returns:
String object holding a string that identifies the XML parser in use.

Initialises the XMLParser module ready for use.

Note that this calls the protected abstract method 'initialiseImpl', which should be provided in your implementation to perform any required initialisation.

Returns:
  • true if the module initialised successfully.
  • false if the module initialisation failed.
virtual bool CEGUI::XMLParser::initialiseImpl ( void  ) [protected, pure virtual]

abstract method which initialises the XMLParser ready for use.

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

Implemented in CEGUI::XercesParser, CEGUI::ExpatParser, CEGUI::LibxmlParser, CEGUI::TinyXMLParser, and CEGUI::RapidXMLParser.

virtual void CEGUI::XMLParser::parseXML ( XMLHandler handler,
const RawDataContainer source,
const String schemaName 
) [pure 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.

Implemented in CEGUI::XercesParser, CEGUI::ExpatParser, CEGUI::LibxmlParser, CEGUI::TinyXMLParser, and CEGUI::RapidXMLParser.

virtual void CEGUI::XMLParser::parseXMLFile ( XMLHandler handler,
const String filename,
const String schemaName,
const String resourceGroup 
) [virtual]

convenience method which initiates parsing of an XML file.

Parameters:
handlerXMLHandler based object which will process the XML elements.
filenameString object holding the filename of the XML file to be parsed.
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.
resourceGroupString object holding the resource group identifier which will be passed to the ResourceProvider when loading the XML and schema files.
Returns:
Nothing.
virtual void CEGUI::XMLParser::parseXMLString ( XMLHandler handler,
const String source,
const String schemaName 
) [virtual]

convenience method which initiates parsing of an XML source from string.

Parameters:
handlerXMLHandler based object which will process the XML elements.
sourceThe XML source passed as a String
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.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends