COPASI API  4.40.278
CExpat Class Reference

#include <CExpat.h>

Inheritance diagram for CExpat:
[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
 
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 ()
 

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

Constructor & Destructor Documentation

◆ CExpat()

CExpat::CExpat ( )

Default constructor

◆ ~CExpat()

CExpat::~CExpat ( )
virtual

Destructor

Member Function Documentation

◆ onCharacterData()

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

Character data handler

Parameters
constXML_Char *pszData
intnLength

Reimplemented in CXMLParser.

◆ onComment()

void CExpat::onComment ( const XML_Char *  pszData)
virtual

Comment handler

Parameters
constXML_Char *pszData

◆ onDefault()

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

Default handler

Parameters
constXML_Char *pszData
intnLength

◆ onEndCdataSection()

void CExpat::onEndCdataSection ( )
virtual

End CDATA section handler

◆ onEndDoctypeDecl()

void CExpat::onEndDoctypeDecl ( )
virtual

End DOCTYPE declaration handler

◆ onEndElement()

void CExpat::onEndElement ( const XML_Char *  pszName)
virtual

End element handler

Parameters
constXML_Char *pszName

Reimplemented in CXMLParser.

◆ onEndNamespaceDecl()

void CExpat::onEndNamespaceDecl ( const XML_Char *  pszPrefix)
virtual

End namespace declaration handler

Parameters
constXML_Char *pszPrefix

◆ onExternalEntityRef()

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

◆ onProcessingInstruction()

void CExpat::onProcessingInstruction ( const XML_Char *  pszTarget,
const XML_Char *  pszData 
)
virtual

Processing instruction handler

Parameters
constXML_Char *pszTarget
constXML_Char *pszData

◆ onSkippedEntityHandler()

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 CXMLParser.

◆ onStartCdataSection()

void CExpat::onStartCdataSection ( )
virtual

Start CDATA section handler

◆ onStartDoctypeDecl()

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

◆ onStartElement()

void CExpat::onStartElement ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Reimplemented in CXMLParser.

◆ onStartNamespaceDecl()

void CExpat::onStartNamespaceDecl ( const XML_Char *  pszPrefix,
const XML_Char *  pszURI 
)
virtual

Start namespace declaration handler

Parameters
constXML_Char *pszPrefix
constXML_Char *pszURI

◆ onUnknownEncoding()

bool CExpat::onUnknownEncoding ( const XML_Char *  pszName,
XML_Encoding *  pInfo 
)
virtual

Unknown encoding handler

Parameters
constXML_Char *pszName
XML_Encoding*pInfo

◆ onXmlDecl()

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

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