COPASI API
4.16.103
|
#include <CExpat.h>
Public Member Functions | |
CExpatTemplate () | |
bool | create (const XML_Char *pszEncoding=NULL, const XML_Char *pszSep=NULL) |
void | destroy () |
void | enableCdataSectionHandler (bool fEnable=true) |
void | enableCharacterDataHandler (bool fEnable=true) |
void | enableCommentHandler (bool fEnable=true) |
void | enableDefaultHandler (bool fEnable=true, bool fExpand=true) |
void | enableDoctypeDeclHandler (bool fEnable=true) |
void | enableElementHandler (bool fEnable=true) |
void | enableEndCdataSectionHandler (bool fEnable=true) |
void | enableEndDoctypeDeclHandler (bool fEnable=true) |
void | enableEndElementHandler (bool fEnable=true) |
void | enableEndNamespaceDeclHandler (bool fEnable=true) |
void | enableExternalEntityRefHandler (bool fEnable=true) |
void | enableNamespaceDeclHandler (bool fEnable=true) |
void | enableProcessingInstructionHandler (bool fEnable=true) |
void | enableSkippedEntityHandler (bool fEnable=true) |
void | enableStartCdataSectionHandler (bool fEnable=true) |
void | enableStartDoctypeDeclHandler (bool fEnable=true) |
void | enableStartElementHandler (bool fEnable=true) |
void | enableStartNamespaceDeclHandler (bool fEnable=true) |
void | enableUnknownEncodingHandler (bool fEnable=true) |
void | enableXmlDeclHandler (bool fEnable=true) |
const char * | getAttributeValue (const std::string &name, const char **attributes, const bool &required=true) const |
const char * | getAttributeValue (const std::string &name, const char **attributes, const char *def) const |
void * | getBuffer (int nLength) |
int | getCurrentByteCount () |
long | getCurrentByteIndex () |
int | getCurrentColumnNumber () |
int | getCurrentLineNumber () const |
enum XML_Error | getErrorCode () |
const XML_LChar * | getErrorString () |
const char * | getInputContext (int *pnOffset, int *pnSize) |
void | onCharacterData (const XML_Char *pszData, int nLength) |
void | onComment (const XML_Char *pszData) |
void | onDefault (const XML_Char *pszData, int nLength) |
void | onEndCdataSection () |
void | onEndDoctypeDecl () |
void | onEndElement (const XML_Char *pszName) |
void | onEndNamespaceDecl (const XML_Char *pszPrefix) |
bool | onExternalEntityRef (const XML_Char *pszContext, const XML_Char *pszBase, const XML_Char *pszSystemID, const XML_Char *pszPublicID) |
void | onProcessingInstruction (const XML_Char *pszTarget, const XML_Char *pszData) |
void | onSkippedEntityHandler (const XML_Char *, int) |
void | onStartCdataSection () |
void | onStartDoctypeDecl (const XML_Char *pszDoctypeName, const XML_Char *pszSysID, const XML_Char *pszPubID, bool fHasInternalSubset) |
void | onStartElement (const XML_Char *pszName, const XML_Char **papszAttrs) |
void | onStartNamespaceDecl (const XML_Char *pszPrefix, const XML_Char *pszURI) |
bool | onUnknownEncoding (const XML_Char *pszName, XML_Encoding *pInfo) |
void | onXmlDecl (const XML_Char *pszVersion, const XML_Char *pszEncoding, bool fStandalone) |
bool | parse (const char *pszBuffer, int nLength=-1, bool fIsFinal=true) |
bool | parseBuffer (int nLength, bool fIsFinal=true) |
~CExpatTemplate () | |
Static Public Member Functions | |
static const XML_LChar * | getErrorString (enum XML_Error nError) |
static const XML_LChar * | getExpatVersion () |
static void | getExpatVersion (int &nMajor, int &nMinor, int &nMicro) |
static bool | toBool (const char *attribute) |
Protected Member Functions | |
void | onPostCreate () |
Static Protected Member Functions | |
static void | characterDataHandler (void *pUserData, const XML_Char *pszData, int nLength) |
static void | commentHandler (void *pUserData, const XML_Char *pszData) |
static void | defaultHandler (void *pUserData, const XML_Char *pszData, int nLength) |
static void | endCdataSectionHandler (void *pUserData) |
static void | endDoctypeDeclHandler (void *pUserData) |
static void | endElementHandler (void *pUserData, const XML_Char *pszName) |
static void | endNamespaceDeclHandler (void *pUserData, const XML_Char *pszPrefix) |
static int | externalEntityRefHandler (XML_Parser pUserData, const XML_Char *pszContext, const XML_Char *pszBase, const XML_Char *pszSystemID, const XML_Char *pszPublicID) |
static void | processingInstructionHandler (void *pUserData, const XML_Char *pszTarget, const XML_Char *pszData) |
static void | skippedEntityHandler (void *pUserData, const XML_Char *entityName, int is_parameter_entity) |
static void | startCdataSectionHandler (void *pUserData) |
static void | startDoctypeDeclHandler (void *pUserData, const XML_Char *pszDoctypeName, const XML_Char *pszSysID, const XML_Char *pszPubID, int nHasInternalSubset) |
static void | startElementHandler (void *pUserData, const XML_Char *pszName, const XML_Char **papszAttrs) |
static void | startNamespaceDeclHandler (void *pUserData, const XML_Char *pszPrefix, const XML_Char *pszURI) |
static int | unknownEncodingHandler (void *pUserData, const XML_Char *pszName, XML_Encoding *pInfo) |
static void | xmlDeclHandler (void *pUserData, const XML_Char *pszVersion, const XML_Char *pszEncoding, int nStandalone) |
Protected Attributes | |
XML_Parser | mParser |
This file describes the C++ interface to the expat library used by COPASI.
Created for COPASI by Stefan Hoops 2003 Copyright Stefan Hoops CExpatTemplate class. The class CExpatTemplate is a template defining a C++ interface to the expat library.
Created for COPASI by Stefan Hoops 2003
|
inline |
Default constructor
|
inline |
|
inlinestaticprotected |
Character data handler wrapper
void | *pUserData |
const | XML_Char *pszData |
int | nLength |
Definition at line 776 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableCharacterDataHandler().
|
inlinestaticprotected |
Comment handler wrapper
void | *pUserData |
const | XML_Char *pszData |
Definition at line 803 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableCommentHandler().
|
inline |
|
inlinestaticprotected |
Default wrapper
void | *pUserData |
const | XML_Char *pszData |
int | nLength |
Definition at line 836 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableDefaultHandler().
|
inline |
Destroy the parser
Definition at line 54 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::create(), and CExpatTemplate< CExpat >::~CExpatTemplate().
|
inline |
Enable/Disable the CDATA section handlers
bool | fEnable (Default: true) |
Definition at line 298 of file CExpat.h.
|
inline |
Enable/Disable the character data handler
bool | fEnable (Default: true) |
Definition at line 244 of file CExpat.h.
|
inline |
Enable/Disable the comment handler
bool | fEnable (Default: true) |
Definition at line 266 of file CExpat.h.
|
inline |
Enable/Disable default handler
bool | fEnable (Default: true) |
Definition at line 309 of file CExpat.h.
|
inline |
Enable/Disable the DOCTYPE declaration handler
bool | fEnable (Default: true) |
Definition at line 424 of file CExpat.h.
|
inline |
Enable/Disable the element handlers
bool | fEnable (Default: true) |
Definition at line 233 of file CExpat.h.
|
inline |
Enable/Disable the end CDATA section handlers
bool | fEnable (Default: true) |
Definition at line 287 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableCdataSectionHandler().
|
inline |
Enable/Disable the end DOCTYPE declaration handler
bool | fEnable (Default: true) |
Definition at line 413 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableDoctypeDeclHandler().
|
inline |
Enable/Disable end element handler
bool | fEnable (Default: true) |
Definition at line 223 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableElementHandler().
|
inline |
Enable/Disable end namespace handler
bool | fEnable (Default: true) |
Definition at line 371 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableNamespaceDeclHandler().
|
inline |
Enable/Disable external entity ref handler
bool | fEnable (Default: true) |
Definition at line 326 of file CExpat.h.
|
inline |
Enable/Disable namespace handlers
bool | fEnable (Default: true) |
Definition at line 382 of file CExpat.h.
|
inline |
Enable/Disable the processing instruction handler
bool | fEnable (Default: true) |
Definition at line 255 of file CExpat.h.
|
inline |
Enable/Disable the skipped entity handler
bool | fEnable (Default: true) |
Definition at line 337 of file CExpat.h.
|
inline |
Enable/Disable the start CDATA section handler
bool | fEnable (Default: true) |
Definition at line 276 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableCdataSectionHandler().
|
inline |
Enable/Disable the start DOCTYPE declaration handler
bool | fEnable (Default: true) |
Definition at line 402 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableDoctypeDeclHandler().
|
inline |
Enable/Disable the start element handler
bool | fEnable (Default: true) |
Definition at line 213 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableElementHandler().
|
inline |
Enable/Disable start namespace handler
bool | fEnable (Default: true) |
Definition at line 360 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableNamespaceDeclHandler().
|
inline |
Enable/Disable unknown encoding handler
bool | fEnable (Default: true) |
Definition at line 348 of file CExpat.h.
|
inline |
Enable/Disable the XML declaration handler
bool | fEnable (Default: true) |
Definition at line 392 of file CExpat.h.
|
inlinestaticprotected |
End CDATA section wrapper
void | *pUserData |
Definition at line 824 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableEndCdataSectionHandler().
|
inlinestaticprotected |
End Doctype declaration wrapper
void | *pUserData |
Definition at line 965 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableEndDoctypeDeclHandler().
|
inlinestaticprotected |
End element handler wrapper
void | *pUserData |
const | XML_Char *pszName |
Definition at line 763 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableEndElementHandler().
|
inlinestaticprotected |
End namespace decl wrapper
void | *pUserData |
const | XML_Char *pszPrefix |
Definition at line 919 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableEndNamespaceDeclHandler().
|
inlinestaticprotected |
External entity ref wrapper
void | *pUserData |
const | XML_Char *pszContext |
const | XML_Char *pszBase |
const | XML_Char *pszSystemID |
const | XML_Char *pszPublicID |
Definition at line 852 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableExternalEntityRefHandler().
|
inline |
Retrieve the attribute value for the given name out of the list of attributes. If required is true and the attribute is not found an exception is thrown. If required is false and the attribute is not found NULL is returned.
const | std::string & name |
const | char ** attributes |
const | bool & required (default: true) |
Definition at line 685 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::getAttributeValue().
|
inline |
Retrieve the attribute value for the given name out of the list of attributes. If the attribute is not found default is returned.
const | std::string & name |
const | char ** attributes |
const | char * default |
Definition at line 711 of file CExpat.h.
|
inline |
|
inline |
|
inline |
|
inline |
Get the current column number
Definition at line 480 of file CExpat.h.
Referenced by CCopasiXML::load(), and CConfigurationFile::CXML::load().
|
inline |
Get the current line number
Definition at line 470 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::getAttributeValue(), CCopasiXML::load(), and CConfigurationFile::CXML::load().
|
inline |
Get last error
Definition at line 435 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::getErrorString().
|
inline |
Get last error string
Definition at line 445 of file CExpat.h.
Referenced by CCopasiXML::load(), and CConfigurationFile::CXML::load().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprotected |
|
inline |
|
inline |
Skipped entity handler This is called in two situations: 1) An entity reference is encountered for which no declaration has been read and this is not an error. 2) An internal entity reference is read, but not expanded, because XML_SetDefaultHandler has been called. Note: skipped parameter entities in declarations and skipped general entities in attribute values cannot be reported, because the event would be out of sync with the reporting of the declarations or attribute values
const | XML_Char *entityName |
int | is_parameter_entity |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Parse a block of character data
const | char *pszBuffer |
int | nLength (Default: -1 (zero terminated)) |
bool | fIsFinal (Default: true) |
Definition at line 135 of file CExpat.h.
Referenced by CAnnotation::isValidXML(), CCopasiXML::load(), and CConfigurationFile::CXML::load().
|
inline |
|
inlinestaticprotected |
Processing instruction handler wrapper
void | *pUserData |
const | XML_Char *pszTarget |
const | XML_Char *pszData |
Definition at line 790 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableProcessingInstructionHandler().
|
inlinestaticprotected |
Skipped entity handler This is called in two situations: 1) An entity reference is encountered for which no declaration has been read and this is not an error. 2) An internal entity reference is read, but not expanded, because XML_SetDefaultHandler has been called. Note: skipped parameter entities in declarations and skipped general entities in attribute values cannot be reported, because the event would be out of sync with the reporting of the declarations or attribute values
void | *pUserData |
const | XML_Char *entityName |
int | is_parameter_entity |
Definition at line 878 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableSkippedEntityHandler().
|
inlinestaticprotected |
Start CDATA section wrapper
void | *pUserData |
Definition at line 814 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableStartCdataSectionHandler().
|
inlinestaticprotected |
Start Doctype declaration wrapper
void | *pUserData |
const | XML_Char *pszDoctypeName |
const | XML_Char *pszSysID |
const | XML_Char *pszPubID |
int | nHasInternalSubset |
Definition at line 950 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableStartDoctypeDeclHandler().
|
inlinestaticprotected |
Start element handler wrapper
void | *pUserData |
const | XML_Char *pszName |
const | XML_Char **papszAttrs |
Definition at line 750 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableStartElementHandler().
|
inlinestaticprotected |
Start namespace decl wrapper
void | *pUserData |
const | XML_Char *pszPrefix |
const | XML_Char *pszURI |
Definition at line 906 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableStartNamespaceDeclHandler().
|
inlinestatic |
Convert an attribute of type xs:boolean to bool. If attribute is NULL false is returned.
const | char * attribute |
|
inlinestaticprotected |
Unknown encoding wrapper
void | *pUserData |
const | XML_Char *pszName |
XML_Encoding | *pInfo |
Definition at line 892 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableUnknownEncodingHandler().
|
inlinestaticprotected |
XML declaration wrapper
void | *pUserData |
const | XML_Char *pszVersion |
const | XML_Char *pszEncoding |
int | nStandalone |
Definition at line 933 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::enableXmlDeclHandler().
|
protected |
The expat parser
Definition at line 48 of file CExpat.h.
Referenced by CExpatTemplate< CExpat >::create(), CExpatTemplate< CExpat >::destroy(), CExpatTemplate< CExpat >::enableCdataSectionHandler(), CExpatTemplate< CExpat >::enableCharacterDataHandler(), CExpatTemplate< CExpat >::enableCommentHandler(), CExpatTemplate< CExpat >::enableDefaultHandler(), CExpatTemplate< CExpat >::enableDoctypeDeclHandler(), CExpatTemplate< CExpat >::enableElementHandler(), CExpatTemplate< CExpat >::enableEndCdataSectionHandler(), CExpatTemplate< CExpat >::enableEndDoctypeDeclHandler(), CExpatTemplate< CExpat >::enableEndElementHandler(), CExpatTemplate< CExpat >::enableEndNamespaceDeclHandler(), CExpatTemplate< CExpat >::enableExternalEntityRefHandler(), CExpatTemplate< CExpat >::enableProcessingInstructionHandler(), CExpatTemplate< CExpat >::enableSkippedEntityHandler(), CExpatTemplate< CExpat >::enableStartCdataSectionHandler(), CExpatTemplate< CExpat >::enableStartDoctypeDeclHandler(), CExpatTemplate< CExpat >::enableStartElementHandler(), CExpatTemplate< CExpat >::enableStartNamespaceDeclHandler(), CExpatTemplate< CExpat >::enableUnknownEncodingHandler(), CExpatTemplate< CExpat >::enableXmlDeclHandler(), CExpatTemplate< CExpat >::getBuffer(), CExpatTemplate< CExpat >::getCurrentByteCount(), CExpatTemplate< CExpat >::getCurrentByteIndex(), CExpatTemplate< CExpat >::getCurrentColumnNumber(), CExpatTemplate< CExpat >::getCurrentLineNumber(), CExpatTemplate< CExpat >::getErrorCode(), CExpatTemplate< CExpat >::getInputContext(), CExpatTemplate< CExpat >::parse(), and CExpatTemplate< CExpat >::parseBuffer().