COPASI API  4.16.103
Public Member Functions | List of all members
CExpat Class Reference

#include <CExpat.h>

Inheritance diagram for CExpat:
Inheritance graph
[legend]
Collaboration diagram for CExpat:
Collaboration graph
[legend]

Public Member Functions

 CExpat ()
 
virtual void onCharacterData (const XML_Char *pszData, int nLength)
 
virtual void onComment (const XML_Char *pszData)
 
virtual void onDefault (const XML_Char *pszData, int nLength)
 
virtual void onEndCdataSection ()
 
virtual void onEndDoctypeDecl ()
 
virtual void onEndElement (const XML_Char *pszName)
 
virtual void onEndNamespaceDecl (const XML_Char *pszPrefix)
 
virtual bool onExternalEntityRef (const XML_Char *pszContext, const XML_Char *pszBase, const XML_Char *pszSystemID, const XML_Char *pszPublicID)
 
virtual void onProcessingInstruction (const XML_Char *pszTarget, const XML_Char *pszData)
 
virtual void onSkippedEntityHandler (const XML_Char *, int)
 
virtual void onStartCdataSection ()
 
virtual void onStartDoctypeDecl (const XML_Char *pszDoctypeName, const XML_Char *pszSysID, const XML_Char *pszPubID, bool fHasInternalSubset)
 
virtual void onStartElement (const XML_Char *pszName, const XML_Char **papszAttrs)
 
virtual void onStartNamespaceDecl (const XML_Char *pszPrefix, const XML_Char *pszURI)
 
virtual bool onUnknownEncoding (const XML_Char *pszName, XML_Encoding *pInfo)
 
virtual void onXmlDecl (const XML_Char *pszVersion, const XML_Char *pszEncoding, bool fStandalone)
 
virtual ~CExpat ()
 
- Public Member Functions inherited from CExpatTemplate< CExpat >
 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
 
voidgetBuffer (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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from CExpatTemplate< CExpat >
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 inherited from CExpatTemplate< CExpat >
void onPostCreate ()
 
- Static Protected Member Functions inherited from CExpatTemplate< CExpat >
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 inherited from CExpatTemplate< CExpat >
XML_Parser mParser
 

Detailed Description

CExpat class. The class CExpat is an instantiation of the CExpatTemplate class above. Is can be used where late binding is preferred to template behaviour.

Created for Copasi by Stefan Hoops 2003

Definition at line 979 of file CExpat.h.

Constructor & Destructor Documentation

CExpat::CExpat ( )

Default constructor

Definition at line 31 of file CExpat.cpp.

32 {}
CExpat::~CExpat ( )
virtual

Destructor

Definition at line 34 of file CExpat.cpp.

35 {}

Member Function Documentation

void CExpat::onCharacterData ( const XML_Char *  pszData,
int  nLength 
)
virtual

Character data handler

Parameters
constXML_Char *pszData
intnLength

Reimplemented in CCopasiXMLParser.

Definition at line 44 of file CExpat.cpp.

46 {return;}
void CExpat::onComment ( const XML_Char *  pszData)
virtual

Comment handler

Parameters
constXML_Char *pszData

Definition at line 52 of file CExpat.cpp.

53 {return;}
void CExpat::onDefault ( const XML_Char *  pszData,
int  nLength 
)
virtual

Default handler

Parameters
constXML_Char *pszData
intnLength

Definition at line 61 of file CExpat.cpp.

63 {return;}
void CExpat::onEndCdataSection ( )
virtual

End CDATA section handler

Definition at line 58 of file CExpat.cpp.

59 {return;}
void CExpat::onEndDoctypeDecl ( )
virtual

End DOCTYPE declaration handler

Definition at line 97 of file CExpat.cpp.

98 {return;}
void CExpat::onEndElement ( const XML_Char *  pszName)
virtual

End element handler

Parameters
constXML_Char *pszName

Reimplemented in CCopasiXMLParser.

Definition at line 41 of file CExpat.cpp.

42 {return;}
void CExpat::onEndNamespaceDecl ( const XML_Char *  pszPrefix)
virtual

End namespace declaration handler

Parameters
constXML_Char *pszPrefix

Definition at line 83 of file CExpat.cpp.

84 {return;}
bool CExpat::onExternalEntityRef ( const XML_Char *  pszContext,
const XML_Char *  pszBase,
const XML_Char *  pszSystemID,
const XML_Char *  pszPublicID 
)
virtual

External entity ref handler

Parameters
constXML_Char *pszContext
constXML_Char *pszBase
constXML_Char *pszSystemID
constXML_Char *pszPublicID

Definition at line 65 of file CExpat.cpp.

69 {return false;}
void CExpat::onProcessingInstruction ( const XML_Char *  pszTarget,
const XML_Char *  pszData 
)
virtual

Processing instruction handler

Parameters
constXML_Char *pszTarget
constXML_Char *pszData

Definition at line 48 of file CExpat.cpp.

50 {return;}
void CExpat::onSkippedEntityHandler ( const XML_Char *  ,
int   
)
virtual

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

Parameters
constXML_Char *entityName
intis_parameter_entity

Reimplemented in CCopasiXMLParser.

Definition at line 71 of file CExpat.cpp.

73 {return;}
void CExpat::onStartCdataSection ( )
virtual

Start CDATA section handler

Definition at line 55 of file CExpat.cpp.

56 {return;}
void CExpat::onStartDoctypeDecl ( const XML_Char *  pszDoctypeName,
const XML_Char *  pszSysID,
const XML_Char *  pszPubID,
bool  fHasInternalSubset 
)
virtual

Start DOCTYPE declaration handler

Parameters
constXML_Char *pszDoctypeName
constXML_Char *pszSysID
constXML_Char *pszPubID
boolfHasInternalSubset

Definition at line 91 of file CExpat.cpp.

95 {return;}
void CExpat::onStartElement ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Reimplemented in CCopasiXMLParser.

Definition at line 37 of file CExpat.cpp.

39 {return;}
void CExpat::onStartNamespaceDecl ( const XML_Char *  pszPrefix,
const XML_Char *  pszURI 
)
virtual

Start namespace declaration handler

Parameters
constXML_Char *pszPrefix
constXML_Char *pszURI

Definition at line 79 of file CExpat.cpp.

81 {return;}
bool CExpat::onUnknownEncoding ( const XML_Char *  pszName,
XML_Encoding *  pInfo 
)
virtual

Unknown encoding handler

Parameters
constXML_Char *pszName
XML_Encoding*pInfo

Definition at line 75 of file CExpat.cpp.

77 {return false;}
void CExpat::onXmlDecl ( const XML_Char *  pszVersion,
const XML_Char *  pszEncoding,
bool  fStandalone 
)
virtual

XML declaration handler

Parameters
constXML_Char *pszVersion
constXML_Char *pszEncoding
boolfStandalone

Definition at line 86 of file CExpat.cpp.

89 {return;}

The documentation for this class was generated from the following files: