COPASI API  4.40.278
CExpatTemplate< CType > Class Template Reference

#include <CExpat.h>

Inheritance diagram for CExpatTemplate< CType >:
[legend]

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
 

Detailed Description

template<class CType>
class CExpatTemplate< CType >

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

Constructor & Destructor Documentation

◆ CExpatTemplate()

template<class CType >
CExpatTemplate< CType >::CExpatTemplate ( )
inline

Default constructor

◆ ~CExpatTemplate()

template<class CType >
CExpatTemplate< CType >::~CExpatTemplate ( )
inline

Destructor

References CExpatTemplate< CType >::destroy().

Member Function Documentation

◆ characterDataHandler()

template<class CType >
static void CExpatTemplate< CType >::characterDataHandler ( void *  pUserData,
const XML_Char *  pszData,
int  nLength 
)
inlinestaticprotected

Character data handler wrapper

Parameters
void*pUserData
constXML_Char *pszData
intnLength

Referenced by CExpatTemplate< CType >::enableCharacterDataHandler().

◆ commentHandler()

template<class CType >
static void CExpatTemplate< CType >::commentHandler ( void *  pUserData,
const XML_Char *  pszData 
)
inlinestaticprotected

Comment handler wrapper

Parameters
void*pUserData
constXML_Char *pszData

Referenced by CExpatTemplate< CType >::enableCommentHandler().

◆ create()

template<class CType >
bool CExpatTemplate< CType >::create ( const XML_Char *  pszEncoding = NULL,
const XML_Char *  pszSep = NULL 
)
inline

Create a parser

Parameters
constXML_Char *pszEncoding (Default = NULL)
constXML_Char *pszSep (Default = NULL)

References CExpatTemplate< CType >::destroy(), and CExpatTemplate< CType >::mParser.

◆ defaultHandler()

template<class CType >
static void CExpatTemplate< CType >::defaultHandler ( void *  pUserData,
const XML_Char *  pszData,
int  nLength 
)
inlinestaticprotected

Default wrapper

Parameters
void*pUserData
constXML_Char *pszData
intnLength

Referenced by CExpatTemplate< CType >::enableDefaultHandler().

◆ destroy()

template<class CType >
void CExpatTemplate< CType >::destroy ( )
inline

◆ enableCdataSectionHandler()

template<class CType >
void CExpatTemplate< CType >::enableCdataSectionHandler ( bool  fEnable = true)
inline

Enable/Disable the CDATA section handlers

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::enableEndCdataSectionHandler(), CExpatTemplate< CType >::enableStartCdataSectionHandler(), and CExpatTemplate< CType >::mParser.

◆ enableCharacterDataHandler()

template<class CType >
void CExpatTemplate< CType >::enableCharacterDataHandler ( bool  fEnable = true)
inline

Enable/Disable the character data handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::characterDataHandler(), and CExpatTemplate< CType >::mParser.

◆ enableCommentHandler()

template<class CType >
void CExpatTemplate< CType >::enableCommentHandler ( bool  fEnable = true)
inline

Enable/Disable the comment handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::commentHandler(), and CExpatTemplate< CType >::mParser.

◆ enableDefaultHandler()

template<class CType >
void CExpatTemplate< CType >::enableDefaultHandler ( bool  fEnable = true,
bool  fExpand = true 
)
inline

Enable/Disable default handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::defaultHandler(), and CExpatTemplate< CType >::mParser.

◆ enableDoctypeDeclHandler()

template<class CType >
void CExpatTemplate< CType >::enableDoctypeDeclHandler ( bool  fEnable = true)
inline

Enable/Disable the DOCTYPE declaration handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::enableEndDoctypeDeclHandler(), CExpatTemplate< CType >::enableStartDoctypeDeclHandler(), and CExpatTemplate< CType >::mParser.

◆ enableElementHandler()

template<class CType >
void CExpatTemplate< CType >::enableElementHandler ( bool  fEnable = true)
inline

Enable/Disable the element handlers

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::enableEndElementHandler(), CExpatTemplate< CType >::enableStartElementHandler(), and CExpatTemplate< CType >::mParser.

◆ enableEndCdataSectionHandler()

template<class CType >
void CExpatTemplate< CType >::enableEndCdataSectionHandler ( bool  fEnable = true)
inline

Enable/Disable the end CDATA section handlers

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::endCdataSectionHandler(), and CExpatTemplate< CType >::mParser.

Referenced by CExpatTemplate< CType >::enableCdataSectionHandler().

◆ enableEndDoctypeDeclHandler()

template<class CType >
void CExpatTemplate< CType >::enableEndDoctypeDeclHandler ( bool  fEnable = true)
inline

Enable/Disable the end DOCTYPE declaration handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::endDoctypeDeclHandler(), and CExpatTemplate< CType >::mParser.

Referenced by CExpatTemplate< CType >::enableDoctypeDeclHandler().

◆ enableEndElementHandler()

template<class CType >
void CExpatTemplate< CType >::enableEndElementHandler ( bool  fEnable = true)
inline

Enable/Disable end element handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::endElementHandler(), and CExpatTemplate< CType >::mParser.

Referenced by CExpatTemplate< CType >::enableElementHandler().

◆ enableEndNamespaceDeclHandler()

template<class CType >
void CExpatTemplate< CType >::enableEndNamespaceDeclHandler ( bool  fEnable = true)
inline

Enable/Disable end namespace handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::endNamespaceDeclHandler(), and CExpatTemplate< CType >::mParser.

Referenced by CExpatTemplate< CType >::enableNamespaceDeclHandler().

◆ enableExternalEntityRefHandler()

template<class CType >
void CExpatTemplate< CType >::enableExternalEntityRefHandler ( bool  fEnable = true)
inline

Enable/Disable external entity ref handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::externalEntityRefHandler(), and CExpatTemplate< CType >::mParser.

◆ enableNamespaceDeclHandler()

template<class CType >
void CExpatTemplate< CType >::enableNamespaceDeclHandler ( bool  fEnable = true)
inline

Enable/Disable namespace handlers

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::enableEndNamespaceDeclHandler(), and CExpatTemplate< CType >::enableStartNamespaceDeclHandler().

◆ enableProcessingInstructionHandler()

template<class CType >
void CExpatTemplate< CType >::enableProcessingInstructionHandler ( bool  fEnable = true)
inline

Enable/Disable the processing instruction handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::mParser, and CExpatTemplate< CType >::processingInstructionHandler().

◆ enableSkippedEntityHandler()

template<class CType >
void CExpatTemplate< CType >::enableSkippedEntityHandler ( bool  fEnable = true)
inline

Enable/Disable the skipped entity handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::mParser, and CExpatTemplate< CType >::skippedEntityHandler().

Referenced by CommentHandler::processEnd(), and CommentHandler::processStart().

◆ enableStartCdataSectionHandler()

template<class CType >
void CExpatTemplate< CType >::enableStartCdataSectionHandler ( bool  fEnable = true)
inline

Enable/Disable the start CDATA section handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::mParser, and CExpatTemplate< CType >::startCdataSectionHandler().

Referenced by CExpatTemplate< CType >::enableCdataSectionHandler().

◆ enableStartDoctypeDeclHandler()

template<class CType >
void CExpatTemplate< CType >::enableStartDoctypeDeclHandler ( bool  fEnable = true)
inline

Enable/Disable the start DOCTYPE declaration handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::mParser, and CExpatTemplate< CType >::startDoctypeDeclHandler().

Referenced by CExpatTemplate< CType >::enableDoctypeDeclHandler().

◆ enableStartElementHandler()

template<class CType >
void CExpatTemplate< CType >::enableStartElementHandler ( bool  fEnable = true)
inline

Enable/Disable the start element handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::mParser, and CExpatTemplate< CType >::startElementHandler().

Referenced by CExpatTemplate< CType >::enableElementHandler().

◆ enableStartNamespaceDeclHandler()

template<class CType >
void CExpatTemplate< CType >::enableStartNamespaceDeclHandler ( bool  fEnable = true)
inline

Enable/Disable start namespace handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::mParser, and CExpatTemplate< CType >::startNamespaceDeclHandler().

Referenced by CExpatTemplate< CType >::enableNamespaceDeclHandler().

◆ enableUnknownEncodingHandler()

template<class CType >
void CExpatTemplate< CType >::enableUnknownEncodingHandler ( bool  fEnable = true)
inline

Enable/Disable unknown encoding handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::mParser, and CExpatTemplate< CType >::unknownEncodingHandler().

◆ enableXmlDeclHandler()

template<class CType >
void CExpatTemplate< CType >::enableXmlDeclHandler ( bool  fEnable = true)
inline

Enable/Disable the XML declaration handler

Parameters
boolfEnable (Default: true)

References CExpatTemplate< CType >::mParser, and CExpatTemplate< CType >::xmlDeclHandler().

◆ endCdataSectionHandler()

template<class CType >
static void CExpatTemplate< CType >::endCdataSectionHandler ( void *  pUserData)
inlinestaticprotected

End CDATA section wrapper

Parameters
void*pUserData

Referenced by CExpatTemplate< CType >::enableEndCdataSectionHandler().

◆ endDoctypeDeclHandler()

template<class CType >
static void CExpatTemplate< CType >::endDoctypeDeclHandler ( void *  pUserData)
inlinestaticprotected

End Doctype declaration wrapper

Parameters
void*pUserData

Referenced by CExpatTemplate< CType >::enableEndDoctypeDeclHandler().

◆ endElementHandler()

template<class CType >
static void CExpatTemplate< CType >::endElementHandler ( void *  pUserData,
const XML_Char *  pszName 
)
inlinestaticprotected

End element handler wrapper

Parameters
void*pUserData
constXML_Char *pszName

Referenced by CExpatTemplate< CType >::enableEndElementHandler().

◆ endNamespaceDeclHandler()

template<class CType >
static void CExpatTemplate< CType >::endNamespaceDeclHandler ( void *  pUserData,
const XML_Char *  pszPrefix 
)
inlinestaticprotected

End namespace decl wrapper

Parameters
void*pUserData
constXML_Char *pszPrefix

Referenced by CExpatTemplate< CType >::enableEndNamespaceDeclHandler().

◆ externalEntityRefHandler()

template<class CType >
static int CExpatTemplate< CType >::externalEntityRefHandler ( XML_Parser  pUserData,
const XML_Char *  pszContext,
const XML_Char *  pszBase,
const XML_Char *  pszSystemID,
const XML_Char *  pszPublicID 
)
inlinestaticprotected

External entity ref wrapper

Parameters
void*pUserData
constXML_Char *pszContext
constXML_Char *pszBase
constXML_Char *pszSystemID
constXML_Char *pszPublicID

Referenced by CExpatTemplate< CType >::enableExternalEntityRefHandler().

◆ getAttributeValue() [1/2]

template<class CType >
const char* CExpatTemplate< CType >::getAttributeValue ( const std::string &  name,
const char **  attributes,
const bool &  required = true 
) const
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.

Parameters
conststd::string & name
constchar ** attributes
constbool & required (default: true)
Returns
const char * value

References C_INT32, CCopasiMessage::ERROR, CExpatTemplate< CType >::getCurrentLineNumber(), and MCXML.

Referenced by CExpatTemplate< CType >::getAttributeValue(), AdditionalGraphicalObjectHandler::processStart(), AssignmentHandler::processStart(), CallParameterHandler::processStart(), ChannelSpecHandler::processStart(), ColorDefinitionHandler::processStart(), CompartmentGlyphHandler::processStart(), CompartmentHandler::processStart(), ConstantHandler::processStart(), COPASIHandler::processStart(), DimensionsHandler::processStart(), EllipseHandler::processStart(), EventHandler::processStart(), FunctionHandler::processStart(), GradientStopHandler::processStart(), GroupHandler::processStart(), ImageHandler::processStart(), KineticLawHandler::processStart(), LayoutHandler::processStart(), LinearGradientHandler::processStart(), LineEndingHandler::processStart(), ListOfCurveSegmentsHandler::processStart(), MetaboliteGlyphHandler::processStart(), MetaboliteHandler::processStart(), MetaboliteReferenceGlyphHandler::processStart(), MethodHandler::processStart(), ModelHandler::processStart(), ModelParameterGroupHandler::processStart(), ModelParameterHandler::processStart(), ModelParameterSetHandler::processStart(), ModelValueHandler::processStart(), ModifierHandler::processStart(), ObjectHandler::processStart(), ParameterDescriptionHandler::processStart(), ParameterGroupHandler::processStart(), ParameterHandler::processStart(), ParameterTextHandler::processStart(), PlotItemHandler::processStart(), PlotSpecificationHandler::processStart(), PointHandler::processStart(), PolygonHandler::processStart(), ProductHandler::processStart(), RadialGradientHandler::processStart(), ReactionGlyphHandler::processStart(), ReactionHandler::processStart(), RectangleHandler::processStart(), RenderCurveElementHandler::processStart(), RenderCurveHandler::processStart(), RenderInformationHandler::processStart(), RenderTextHandler::processStart(), ReportDefinitionHandler::processStart(), ReportTargetHandler::processStart(), SBMLMapHandler::processStart(), SliderHandler::processStart(), SourceParameterHandler::processStart(), StateTemplateVariableHandler::processStart(), StyleHandler::processStart(), SubstrateHandler::processStart(), TableHandler::processStart(), TaskHandler::processStart(), TextGlyphHandler::processStart(), UnitDefinitionHandler::processStart(), and UnsupportedAnnotationHandler::processStart().

◆ getAttributeValue() [2/2]

template<class CType >
const char* CExpatTemplate< CType >::getAttributeValue ( const std::string &  name,
const char **  attributes,
const char *  def 
) const
inline

Retrieve the attribute value for the given name out of the list of attributes. If the attribute is not found default is returned.

Parameters
conststd::string & name
constchar ** attributes
constchar * default
Returns
const char * value

References CExpatTemplate< CType >::getAttributeValue().

◆ getBuffer()

template<class CType >
void* CExpatTemplate< CType >::getBuffer ( int  nLength)
inline

Get the internal buffer

References CExpatTemplate< CType >::mParser.

◆ getCurrentByteCount()

template<class CType >
int CExpatTemplate< CType >::getCurrentByteCount ( )
inline

Get the current byte count

Returns
in byteCount

References CExpatTemplate< CType >::mParser.

◆ getCurrentByteIndex()

template<class CType >
long CExpatTemplate< CType >::getCurrentByteIndex ( )
inline

Get the current byte index

Returns
long byteIndex

References CExpatTemplate< CType >::mParser.

◆ getCurrentColumnNumber()

template<class CType >
int CExpatTemplate< CType >::getCurrentColumnNumber ( )
inline

Get the current column number

Returns
in cloumnNumber

References CExpatTemplate< CType >::mParser.

Referenced by CCopasiXML::load(), CConfigurationFile::CXML::load(), AdditionalGraphicalObjectHandler::processEnd(), AssignmentHandler::processEnd(), BoundingBoxHandler::processEnd(), CallParameterHandler::processEnd(), ChannelSpecHandler::processEnd(), ColorDefinitionHandler::processEnd(), CompartmentGlyphHandler::processEnd(), CompartmentHandler::processEnd(), ConstantHandler::processEnd(), COPASIHandler::processEnd(), CubicBezierHandler::processEnd(), CurveHandler::processEnd(), DimensionsHandler::processEnd(), EllipseHandler::processEnd(), EventHandler::processEnd(), FunctionHandler::processEnd(), GradientStopHandler::processEnd(), GroupHandler::processEnd(), GUIHandler::processEnd(), ImageHandler::processEnd(), InitialStateHandler::processEnd(), KineticLawHandler::processEnd(), LayoutHandler::processEnd(), LinearGradientHandler::processEnd(), LineEndingHandler::processEnd(), LineSegmentHandler::processEnd(), ListOfCurveSegmentsHandler::processEnd(), ListOfGradientDefinitionsHandler::processEnd(), ListOfHandler::processEnd(), ListOfLayoutsHandler::processEnd(), MathMLHandler::processEnd(), MetaboliteGlyphHandler::processEnd(), MetaboliteHandler::processEnd(), MetaboliteReferenceGlyphHandler::processEnd(), MethodHandler::processEnd(), ModelHandler::processEnd(), ModelParameterGroupHandler::processEnd(), ModelParameterHandler::processEnd(), ModelParameterSetHandler::processEnd(), ModelValueHandler::processEnd(), ModifierHandler::processEnd(), ObjectHandler::processEnd(), ParameterDescriptionHandler::processEnd(), ParameterGroupHandler::processEnd(), ParameterHandler::processEnd(), ParameterTextHandler::processEnd(), PlotItemHandler::processEnd(), PlotSpecificationHandler::processEnd(), PointHandler::processEnd(), PolygonHandler::processEnd(), ProductHandler::processEnd(), RadialGradientHandler::processEnd(), ReactionGlyphHandler::processEnd(), ReactionHandler::processEnd(), RectangleHandler::processEnd(), RenderCurveElementHandler::processEnd(), RenderCurveHandler::processEnd(), RenderInformationHandler::processEnd(), RenderTextHandler::processEnd(), ReportDefinitionHandler::processEnd(), ReportSectionHandler::processEnd(), ReportTargetHandler::processEnd(), SBMLMapHandler::processEnd(), SliderHandler::processEnd(), SourceParameterHandler::processEnd(), StateTemplateHandler::processEnd(), StateTemplateVariableHandler::processEnd(), StyleHandler::processEnd(), SubstrateHandler::processEnd(), TableHandler::processEnd(), TaskHandler::processEnd(), TextGlyphHandler::processEnd(), UnitDefinitionHandler::processEnd(), AdditionalGraphicalObjectHandler::processStart(), AssignmentHandler::processStart(), BoundingBoxHandler::processStart(), CallParameterHandler::processStart(), ChannelSpecHandler::processStart(), ColorDefinitionHandler::processStart(), CompartmentGlyphHandler::processStart(), CompartmentHandler::processStart(), ConstantHandler::processStart(), COPASIHandler::processStart(), CubicBezierHandler::processStart(), CurveHandler::processStart(), DimensionsHandler::processStart(), EllipseHandler::processStart(), EventHandler::processStart(), FunctionHandler::processStart(), GradientStopHandler::processStart(), GroupHandler::processStart(), GUIHandler::processStart(), ImageHandler::processStart(), InitialStateHandler::processStart(), KineticLawHandler::processStart(), LayoutHandler::processStart(), LinearGradientHandler::processStart(), LineEndingHandler::processStart(), LineSegmentHandler::processStart(), ListOfCurveSegmentsHandler::processStart(), ListOfGradientDefinitionsHandler::processStart(), ListOfHandler::processStart(), ListOfLayoutsHandler::processStart(), MathMLHandler::processStart(), MetaboliteGlyphHandler::processStart(), MetaboliteHandler::processStart(), MetaboliteReferenceGlyphHandler::processStart(), MethodHandler::processStart(), ModelHandler::processStart(), ModelParameterGroupHandler::processStart(), ModelParameterHandler::processStart(), ModelParameterSetHandler::processStart(), ModelValueHandler::processStart(), ModifierHandler::processStart(), ObjectHandler::processStart(), ParameterDescriptionHandler::processStart(), ParameterGroupHandler::processStart(), ParameterHandler::processStart(), ParameterTextHandler::processStart(), PlotItemHandler::processStart(), PlotSpecificationHandler::processStart(), PointHandler::processStart(), PolygonHandler::processStart(), ProductHandler::processStart(), RadialGradientHandler::processStart(), ReactionGlyphHandler::processStart(), ReactionHandler::processStart(), RectangleHandler::processStart(), RenderCurveElementHandler::processStart(), RenderCurveHandler::processStart(), RenderInformationHandler::processStart(), RenderTextHandler::processStart(), ReportDefinitionHandler::processStart(), ReportSectionHandler::processStart(), ReportTargetHandler::processStart(), SBMLMapHandler::processStart(), SliderHandler::processStart(), SourceParameterHandler::processStart(), StateTemplateHandler::processStart(), StateTemplateVariableHandler::processStart(), StyleHandler::processStart(), SubstrateHandler::processStart(), TableHandler::processStart(), TaskHandler::processStart(), TextGlyphHandler::processStart(), and UnitDefinitionHandler::processStart().

◆ getCurrentLineNumber()

template<class CType >
int CExpatTemplate< CType >::getCurrentLineNumber ( ) const
inline

Get the current line number

Returns
ing lineNumber

References CExpatTemplate< CType >::mParser.

Referenced by CXMLHandler::addFix(), CXMLHandler::end(), CExpatTemplate< CType >::getAttributeValue(), CCopasiXML::load(), CConfigurationFile::CXML::load(), AdditionalGraphicalObjectHandler::processEnd(), AssignmentHandler::processEnd(), BoundingBoxHandler::processEnd(), CallParameterHandler::processEnd(), ChannelSpecHandler::processEnd(), CharacterDataHandler::processEnd(), ColorDefinitionHandler::processEnd(), CompartmentGlyphHandler::processEnd(), CompartmentHandler::processEnd(), ConstantHandler::processEnd(), COPASIHandler::processEnd(), CubicBezierHandler::processEnd(), CurveHandler::processEnd(), DimensionsHandler::processEnd(), EllipseHandler::processEnd(), EventHandler::processEnd(), FunctionHandler::processEnd(), GradientStopHandler::processEnd(), GroupHandler::processEnd(), GUIHandler::processEnd(), ImageHandler::processEnd(), InitialStateHandler::processEnd(), KineticLawHandler::processEnd(), LayoutHandler::processEnd(), LinearGradientHandler::processEnd(), LineEndingHandler::processEnd(), LineSegmentHandler::processEnd(), ListOfCurveSegmentsHandler::processEnd(), ListOfGradientDefinitionsHandler::processEnd(), ListOfHandler::processEnd(), ListOfLayoutsHandler::processEnd(), MathMLHandler::processEnd(), MetaboliteGlyphHandler::processEnd(), MetaboliteHandler::processEnd(), MetaboliteReferenceGlyphHandler::processEnd(), MethodHandler::processEnd(), ModelHandler::processEnd(), ModelParameterGroupHandler::processEnd(), ModelParameterHandler::processEnd(), ModelParameterSetHandler::processEnd(), ModelValueHandler::processEnd(), ModifierHandler::processEnd(), ObjectHandler::processEnd(), ParameterDescriptionHandler::processEnd(), ParameterGroupHandler::processEnd(), ParameterHandler::processEnd(), ParameterTextHandler::processEnd(), PlotItemHandler::processEnd(), PlotSpecificationHandler::processEnd(), PointHandler::processEnd(), PolygonHandler::processEnd(), ProductHandler::processEnd(), RadialGradientHandler::processEnd(), ReactionGlyphHandler::processEnd(), ReactionHandler::processEnd(), RectangleHandler::processEnd(), RenderCurveElementHandler::processEnd(), RenderCurveHandler::processEnd(), RenderInformationHandler::processEnd(), RenderTextHandler::processEnd(), ReportDefinitionHandler::processEnd(), ReportSectionHandler::processEnd(), ReportTargetHandler::processEnd(), SBMLMapHandler::processEnd(), SliderHandler::processEnd(), SourceParameterHandler::processEnd(), StateTemplateHandler::processEnd(), StateTemplateVariableHandler::processEnd(), StyleHandler::processEnd(), SubstrateHandler::processEnd(), TableHandler::processEnd(), TaskHandler::processEnd(), TextGlyphHandler::processEnd(), UnitDefinitionHandler::processEnd(), AdditionalGraphicalObjectHandler::processStart(), AssignmentHandler::processStart(), BoundingBoxHandler::processStart(), CallParameterHandler::processStart(), ChannelSpecHandler::processStart(), ColorDefinitionHandler::processStart(), CompartmentGlyphHandler::processStart(), CompartmentHandler::processStart(), ConstantHandler::processStart(), COPASIHandler::processStart(), CubicBezierHandler::processStart(), CurveHandler::processStart(), DimensionsHandler::processStart(), EllipseHandler::processStart(), EventHandler::processStart(), FunctionHandler::processStart(), GradientStopHandler::processStart(), GroupHandler::processStart(), GUIHandler::processStart(), ImageHandler::processStart(), InitialStateHandler::processStart(), KineticLawHandler::processStart(), LayoutHandler::processStart(), LinearGradientHandler::processStart(), LineEndingHandler::processStart(), LineSegmentHandler::processStart(), ListOfCurveSegmentsHandler::processStart(), ListOfGradientDefinitionsHandler::processStart(), ListOfHandler::processStart(), ListOfLayoutsHandler::processStart(), MathMLHandler::processStart(), MetaboliteGlyphHandler::processStart(), MetaboliteHandler::processStart(), MetaboliteReferenceGlyphHandler::processStart(), MethodHandler::processStart(), ModelHandler::processStart(), ModelParameterGroupHandler::processStart(), ModelParameterHandler::processStart(), ModelParameterSetHandler::processStart(), ModelValueHandler::processStart(), ModifierHandler::processStart(), ObjectHandler::processStart(), ParameterDescriptionHandler::processStart(), ParameterGroupHandler::processStart(), ParameterHandler::processStart(), ParameterTextHandler::processStart(), PlotItemHandler::processStart(), PlotSpecificationHandler::processStart(), PointHandler::processStart(), PolygonHandler::processStart(), ProductHandler::processStart(), RadialGradientHandler::processStart(), ReactionGlyphHandler::processStart(), ReactionHandler::processStart(), RectangleHandler::processStart(), RenderCurveElementHandler::processStart(), RenderCurveHandler::processStart(), RenderInformationHandler::processStart(), RenderTextHandler::processStart(), ReportDefinitionHandler::processStart(), ReportSectionHandler::processStart(), ReportTargetHandler::processStart(), SBMLMapHandler::processStart(), SliderHandler::processStart(), SourceParameterHandler::processStart(), StateTemplateHandler::processStart(), StateTemplateVariableHandler::processStart(), StyleHandler::processStart(), SubstrateHandler::processStart(), TableHandler::processStart(), TaskHandler::processStart(), TextGlyphHandler::processStart(), UnitDefinitionHandler::processStart(), and CXMLHandler::start().

◆ getErrorCode()

template<class CType >
enum XML_Error CExpatTemplate< CType >::getErrorCode ( )
inline

Get last error

Returns
enum XML_Error

Referenced by CExpatTemplate< CType >::getErrorString().

◆ getErrorString() [1/2]

template<class CType >
const XML_LChar* CExpatTemplate< CType >::getErrorString ( )
inline

Get last error string

Returns
const XML_LChar * errorString

References CExpatTemplate< CType >::getErrorCode().

Referenced by CCopasiXML::load(), and CConfigurationFile::CXML::load().

◆ getErrorString() [2/2]

template<class CType >
static const XML_LChar* CExpatTemplate< CType >::getErrorString ( enum XML_Error  nError)
inlinestatic

Get error string

Parameters
enumXML_Error nError
Returns
const XML_LChar * errorString

◆ getExpatVersion() [1/2]

template<class CType >
static const XML_LChar* CExpatTemplate< CType >::getExpatVersion ( )
inlinestatic

Return the version string

Returns
const XML_LChar * version

◆ getExpatVersion() [2/2]

template<class CType >
static void CExpatTemplate< CType >::getExpatVersion ( int &  nMajor,
int &  nMinor,
int &  nMicro 
)
inlinestatic

Get the version information

Parameters
intnMajor
intnMinor
intnMicro

◆ getInputContext()

template<class CType >
const char* CExpatTemplate< CType >::getInputContext ( int *  pnOffset,
int *  pnSize 
)
inline

Get the input context @const char * inputContext

References CExpatTemplate< CType >::mParser.

◆ onCharacterData()

template<class CType >
void CExpatTemplate< CType >::onCharacterData ( const XML_Char *  pszData,
int  nLength 
)
inline

Character data handler

Parameters
constXML_Char *pszData
intnLength

◆ onComment()

template<class CType >
void CExpatTemplate< CType >::onComment ( const XML_Char *  pszData)
inline

Comment handler

Parameters
constXML_Char *pszData

◆ onDefault()

template<class CType >
void CExpatTemplate< CType >::onDefault ( const XML_Char *  pszData,
int  nLength 
)
inline

Default handler

Parameters
constXML_Char *pszData
intnLength

◆ onEndCdataSection()

template<class CType >
void CExpatTemplate< CType >::onEndCdataSection ( )
inline

End CDATA section handler

◆ onEndDoctypeDecl()

template<class CType >
void CExpatTemplate< CType >::onEndDoctypeDecl ( )
inline

End DOCTYPE declaration handler

◆ onEndElement()

template<class CType >
void CExpatTemplate< CType >::onEndElement ( const XML_Char *  pszName)
inline

End element handler

Parameters
constXML_Char *pszName

◆ onEndNamespaceDecl()

template<class CType >
void CExpatTemplate< CType >::onEndNamespaceDecl ( const XML_Char *  pszPrefix)
inline

End namespace declaration handler

Parameters
constXML_Char *pszPrefix

◆ onExternalEntityRef()

template<class CType >
bool CExpatTemplate< CType >::onExternalEntityRef ( const XML_Char *  pszContext,
const XML_Char *  pszBase,
const XML_Char *  pszSystemID,
const XML_Char *  pszPublicID 
)
inline

External entity ref handler

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

◆ onPostCreate()

template<class CType >
void CExpatTemplate< CType >::onPostCreate ( )
inlineprotected

Handle any post creation

◆ onProcessingInstruction()

template<class CType >
void CExpatTemplate< CType >::onProcessingInstruction ( const XML_Char *  pszTarget,
const XML_Char *  pszData 
)
inline

Processing instruction handler

Parameters
constXML_Char *pszTarget
constXML_Char *pszData

◆ onSkippedEntityHandler()

template<class CType >
void CExpatTemplate< CType >::onSkippedEntityHandler ( const XML_Char *  ,
int   
)
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

Parameters
constXML_Char *entityName
intis_parameter_entity

◆ onStartCdataSection()

template<class CType >
void CExpatTemplate< CType >::onStartCdataSection ( )
inline

Start CDATA section handler

◆ onStartDoctypeDecl()

template<class CType >
void CExpatTemplate< CType >::onStartDoctypeDecl ( const XML_Char *  pszDoctypeName,
const XML_Char *  pszSysID,
const XML_Char *  pszPubID,
bool  fHasInternalSubset 
)
inline

Start DOCTYPE declaration handler

Parameters
constXML_Char *pszDoctypeName
constXML_Char *pszSysID
constXML_Char *pszPubID
boolfHasInternalSubset

◆ onStartElement()

template<class CType >
void CExpatTemplate< CType >::onStartElement ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
inline

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

◆ onStartNamespaceDecl()

template<class CType >
void CExpatTemplate< CType >::onStartNamespaceDecl ( const XML_Char *  pszPrefix,
const XML_Char *  pszURI 
)
inline

Start namespace declaration handler

Parameters
constXML_Char *pszPrefix
constXML_Char *pszURI

◆ onUnknownEncoding()

template<class CType >
bool CExpatTemplate< CType >::onUnknownEncoding ( const XML_Char *  pszName,
XML_Encoding *  pInfo 
)
inline

Unknown encoding handler

Parameters
constXML_Char *pszName
XML_Encoding*pInfo

◆ onXmlDecl()

template<class CType >
void CExpatTemplate< CType >::onXmlDecl ( const XML_Char *  pszVersion,
const XML_Char *  pszEncoding,
bool  fStandalone 
)
inline

XML declaration handler

Parameters
constXML_Char *pszVersion
constXML_Char *pszEncoding
boolfStandalone

◆ parse()

template<class CType >
bool CExpatTemplate< CType >::parse ( const char *  pszBuffer,
int  nLength = -1,
bool  fIsFinal = true 
)
inline

Parse a block of character data

Parameters
constchar *pszBuffer
intnLength (Default: -1 (zero terminated))
boolfIsFinal (Default: true)
Returns
bool Success

References CExpatTemplate< CType >::mParser.

Referenced by CAnnotation::isValidXML(), CCopasiXML::load(), and CConfigurationFile::CXML::load().

◆ parseBuffer()

template<class CType >
bool CExpatTemplate< CType >::parseBuffer ( int  nLength,
bool  fIsFinal = true 
)
inline

Parse internal buffer

Parameters
intnLength
boolfIsFinal (Default: true)
Returns
bool Success

References CExpatTemplate< CType >::mParser.

◆ processingInstructionHandler()

template<class CType >
static void CExpatTemplate< CType >::processingInstructionHandler ( void *  pUserData,
const XML_Char *  pszTarget,
const XML_Char *  pszData 
)
inlinestaticprotected

Processing instruction handler wrapper

Parameters
void*pUserData
constXML_Char *pszTarget
constXML_Char *pszData

Referenced by CExpatTemplate< CType >::enableProcessingInstructionHandler().

◆ skippedEntityHandler()

template<class CType >
static void CExpatTemplate< CType >::skippedEntityHandler ( void *  pUserData,
const XML_Char *  entityName,
int  is_parameter_entity 
)
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

Parameters
void*pUserData
constXML_Char *entityName
intis_parameter_entity

Referenced by CExpatTemplate< CType >::enableSkippedEntityHandler().

◆ startCdataSectionHandler()

template<class CType >
static void CExpatTemplate< CType >::startCdataSectionHandler ( void *  pUserData)
inlinestaticprotected

Start CDATA section wrapper

Parameters
void*pUserData

Referenced by CExpatTemplate< CType >::enableStartCdataSectionHandler().

◆ startDoctypeDeclHandler()

template<class CType >
static void CExpatTemplate< CType >::startDoctypeDeclHandler ( void *  pUserData,
const XML_Char *  pszDoctypeName,
const XML_Char *  pszSysID,
const XML_Char *  pszPubID,
int  nHasInternalSubset 
)
inlinestaticprotected

Start Doctype declaration wrapper

Parameters
void*pUserData
constXML_Char *pszDoctypeName
constXML_Char *pszSysID
constXML_Char *pszPubID
intnHasInternalSubset

Referenced by CExpatTemplate< CType >::enableStartDoctypeDeclHandler().

◆ startElementHandler()

template<class CType >
static void CExpatTemplate< CType >::startElementHandler ( void *  pUserData,
const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
inlinestaticprotected

Start element handler wrapper

Parameters
void*pUserData
constXML_Char *pszName
constXML_Char **papszAttrs

Referenced by CExpatTemplate< CType >::enableStartElementHandler().

◆ startNamespaceDeclHandler()

template<class CType >
static void CExpatTemplate< CType >::startNamespaceDeclHandler ( void *  pUserData,
const XML_Char *  pszPrefix,
const XML_Char *  pszURI 
)
inlinestaticprotected

Start namespace decl wrapper

Parameters
void*pUserData
constXML_Char *pszPrefix
constXML_Char *pszURI

Referenced by CExpatTemplate< CType >::enableStartNamespaceDeclHandler().

◆ toBool()

template<class CType >
static bool CExpatTemplate< CType >::toBool ( const char *  attribute)
inlinestatic

◆ unknownEncodingHandler()

template<class CType >
static int CExpatTemplate< CType >::unknownEncodingHandler ( void *  pUserData,
const XML_Char *  pszName,
XML_Encoding *  pInfo 
)
inlinestaticprotected

Unknown encoding wrapper

Parameters
void*pUserData
constXML_Char *pszName
XML_Encoding*pInfo

Referenced by CExpatTemplate< CType >::enableUnknownEncodingHandler().

◆ xmlDeclHandler()

template<class CType >
static void CExpatTemplate< CType >::xmlDeclHandler ( void *  pUserData,
const XML_Char *  pszVersion,
const XML_Char *  pszEncoding,
int  nStandalone 
)
inlinestaticprotected

XML declaration wrapper

Parameters
void*pUserData
constXML_Char *pszVersion
constXML_Char *pszEncoding
intnStandalone

Referenced by CExpatTemplate< CType >::enableXmlDeclHandler().

Member Data Documentation

◆ mParser

template<class CType >
XML_Parser CExpatTemplate< CType >::mParser
protected

The expat parser

Referenced by CExpatTemplate< CType >::create(), CExpatTemplate< CType >::destroy(), CExpatTemplate< CType >::enableCdataSectionHandler(), CExpatTemplate< CType >::enableCharacterDataHandler(), CExpatTemplate< CType >::enableCommentHandler(), CExpatTemplate< CType >::enableDefaultHandler(), CExpatTemplate< CType >::enableDoctypeDeclHandler(), CExpatTemplate< CType >::enableElementHandler(), CExpatTemplate< CType >::enableEndCdataSectionHandler(), CExpatTemplate< CType >::enableEndDoctypeDeclHandler(), CExpatTemplate< CType >::enableEndElementHandler(), CExpatTemplate< CType >::enableEndNamespaceDeclHandler(), CExpatTemplate< CType >::enableExternalEntityRefHandler(), CExpatTemplate< CType >::enableProcessingInstructionHandler(), CExpatTemplate< CType >::enableSkippedEntityHandler(), CExpatTemplate< CType >::enableStartCdataSectionHandler(), CExpatTemplate< CType >::enableStartDoctypeDeclHandler(), CExpatTemplate< CType >::enableStartElementHandler(), CExpatTemplate< CType >::enableStartNamespaceDeclHandler(), CExpatTemplate< CType >::enableUnknownEncodingHandler(), CExpatTemplate< CType >::enableXmlDeclHandler(), CExpatTemplate< CType >::getBuffer(), CExpatTemplate< CType >::getCurrentByteCount(), CExpatTemplate< CType >::getCurrentByteIndex(), CExpatTemplate< CType >::getCurrentColumnNumber(), CExpatTemplate< CType >::getCurrentLineNumber(), CExpatTemplate< CType >::getInputContext(), CExpatTemplate< CType >::parse(), and CExpatTemplate< CType >::parseBuffer().


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