#include <ulxr_expatwrap.h>
Inheritance diagram for ulxr::ExpatWrapper:


Public Member Functions | |
| ExpatWrapper (bool createParser=true) | |
| Constructs an expat parser. | |
| virtual | ~ExpatWrapper () |
| Destroys the parser. | |
| virtual int | parse (const char *buffer, int len, int isFinal) |
| Parse a pice of xml data. | |
| virtual unsigned | getErrorCode () const |
| Gets the code for the current error. | |
| virtual CppString | getErrorString (unsigned code) const |
| Gets the description for an error code. | |
| virtual int | getCurrentLineNumber () const |
| Gets the line number in the xml data. | |
| virtual int | mapToFaultCode (int xpatcode) const |
| Maps expat error codes to xml-rpc error codes. | |
Protected Member Functions | |
| operator XML_Parser () const | |
| Gets the parser instance. | |
| virtual void | startElement (const XML_Char *name, const XML_Char **atts) |
| C++ callback for an opening XML tag. | |
| virtual void | endElement (const XML_Char *name) |
| C++ callback for a closing XML tag. | |
| virtual void | charData (const XML_Char *s, int len) |
| C++ callback for regular text from expat. | |
Static Protected Member Functions | |
| static void | startElementCallback (void *userData, const XML_Char *name, const XML_Char **atts) |
| C-style callback for a closing XML tag from expat. | |
| static void | endElementCallback (void *userData, const XML_Char *name) |
| C-style callback for an ending XML tag from expat. | |
| static void | charDataCallback (void *userData, const XML_Char *s, int len) |
| C-style callback for regular text from expat. | |
Private Member Functions | |
| void | setHandler () |
| Sets the callback handlers. | |
| void | reset () |
| Resets the parser. | |
Private Attributes | |
| XML_Parser | expatParser |
Definition at line 43 of file ulxr_expatwrap.h.
| ulxr::ExpatWrapper::ExpatWrapper | ( | bool | createParser = true |
) |
Constructs an expat parser.
| createParser | create a new parser instance |
Definition at line 40 of file ulxr_expatwrap.cpp.
References expatParser, and setHandler().
| ulxr::ExpatWrapper::~ExpatWrapper | ( | ) | [virtual] |
| int ulxr::ExpatWrapper::parse | ( | const char * | buffer, | |
| int | len, | |||
| int | isFinal | |||
| ) | [virtual] |
Parse a pice of xml data.
| buffer | pointer start of next data chunk | |
| len | len of this chunk | |
| isFinal | true: last call to parser |
Implements ulxr::XmlParserBase.
Definition at line 134 of file ulxr_expatwrap.cpp.
| unsigned ulxr::ExpatWrapper::getErrorCode | ( | ) | const [virtual] |
Gets the code for the current error.
Implements ulxr::XmlParserBase.
Definition at line 140 of file ulxr_expatwrap.cpp.
| CppString ulxr::ExpatWrapper::getErrorString | ( | unsigned | code | ) | const [virtual] |
Gets the description for an error code.
| code | error code |
Implements ulxr::XmlParserBase.
Definition at line 146 of file ulxr_expatwrap.cpp.
References ULXR_GET_STRING.
| int ulxr::ExpatWrapper::getCurrentLineNumber | ( | ) | const [virtual] |
Gets the line number in the xml data.
Implements ulxr::XmlParserBase.
Definition at line 156 of file ulxr_expatwrap.cpp.
| int ulxr::ExpatWrapper::mapToFaultCode | ( | int | xpatcode | ) | const [virtual] |
Maps expat error codes to xml-rpc error codes.
| xpatcode | error code from expat |
Implements ulxr::XmlParserBase.
Definition at line 88 of file ulxr_expatwrap.cpp.
References ulxr::InvalidCharacterError, ulxr::NotWellformedError, and ulxr::UnsupportedEncodingError.
| ulxr::ExpatWrapper::operator XML_Parser | ( | ) | const [protected] |
Gets the parser instance.
| void ulxr::ExpatWrapper::startElement | ( | const XML_Char * | name, | |
| const XML_Char ** | atts | |||
| ) | [protected, virtual] |
C++ callback for an opening XML tag.
Used ONLY internally as callback from expat.
| name | the name of the current tag | |
| atts | pointer to the current attributs (unused in XML-RPC) |
Reimplemented in ulxr::MethodCallParser, ulxr::MethodResponseParser, and ulxr::ValueParser.
Definition at line 73 of file ulxr_expatwrap.cpp.
| void ulxr::ExpatWrapper::endElement | ( | const XML_Char * | name | ) | [protected, virtual] |
C++ callback for a closing XML tag.
Used ONLY internally as callback from expat.
| name | the name of the current tag |
Reimplemented in ulxr::MethodCallParser, ulxr::MethodResponseParser, and ulxr::ValueParser.
Definition at line 78 of file ulxr_expatwrap.cpp.
| void ulxr::ExpatWrapper::charData | ( | const XML_Char * | s, | |
| int | len | |||
| ) | [protected, virtual] |
C++ callback for regular text from expat.
Used ONLY internally.
| s | starting buffer with more data | |
| len | lenth of buffer |
Reimplemented in ulxr::XmlParser.
Definition at line 83 of file ulxr_expatwrap.cpp.
| void ulxr::ExpatWrapper::startElementCallback | ( | void * | userData, | |
| const XML_Char * | name, | |||
| const XML_Char ** | atts | |||
| ) | [static, protected] |
C-style callback for a closing XML tag from expat.
Used ONLY internally.
| userData | pointer to the actual C++-object | |
| name | the name of the current tag | |
| atts | to the current attributs (unused in XML-RPC) |
Definition at line 112 of file ulxr_expatwrap.cpp.
| void ulxr::ExpatWrapper::endElementCallback | ( | void * | userData, | |
| const XML_Char * | name | |||
| ) | [static, protected] |
C-style callback for an ending XML tag from expat.
Used ONLY internally.
| userData | pointer to the actual C++-object | |
| name | the name of the current tag |
Definition at line 121 of file ulxr_expatwrap.cpp.
| void ulxr::ExpatWrapper::charDataCallback | ( | void * | userData, | |
| const XML_Char * | s, | |||
| int | len | |||
| ) | [static, protected] |
C-style callback for regular text from expat.
Used ONLY internally.
| userData | pointer to the actual C++-object | |
| s | starting buffer with more data | |
| len | lenth of buffer |
Definition at line 128 of file ulxr_expatwrap.cpp.
| void ulxr::ExpatWrapper::setHandler | ( | ) | [private] |
Sets the callback handlers.
Definition at line 58 of file ulxr_expatwrap.cpp.
Referenced by ExpatWrapper().
| void ulxr::ExpatWrapper::reset | ( | ) | [private] |
XML_Parser ulxr::ExpatWrapper::expatParser [private] |
1.5.1