COPASI API  4.16.103
Public Member Functions | Private Types | List of all members
CCopasiXMLParser::ListOfSubstratesElement Class Reference
Inheritance diagram for CCopasiXMLParser::ListOfSubstratesElement:
Inheritance graph
[legend]
Collaboration diagram for CCopasiXMLParser::ListOfSubstratesElement:
Collaboration graph
[legend]

Public Member Functions

virtual void end (const XML_Char *pszName)
 
 ListOfSubstratesElement (CCopasiXMLParser &parser, SCopasiXMLParserCommon &common)
 
virtual void start (const XML_Char *pszName, const XML_Char **papszAttrs)
 
virtual ~ListOfSubstratesElement ()
 
- Public Member Functions inherited from CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon >
 CXMLElementHandler (CCopasiXMLParser &parser, SCopasiXMLParserCommon &common)
 
virtual void end (const XML_Char *C_UNUSED(pszName))
 
virtual void reset ()
 
virtual void start (const XML_Char *C_UNUSED(pszName), const XML_Char **C_UNUSED(papszAttrs))
 
virtual ~CXMLElementHandler ()
 

Private Types

enum  Element { ListOfSubstrates = 0, Substrate }
 

Additional Inherited Members

- Protected Member Functions inherited from CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon >
void addFix (const std::string &key, CCopasiObject *pObject)
 
void deleteCurrentHandler ()
 
- Protected Attributes inherited from CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon >
SCopasiXMLParserCommonmCommon
 
C_INT32 mCurrentElement
 
C_INT32 mLastKnownElement
 
CCopasiXMLParsermParser
 
CXMLElementHandlermpCurrentHandler
 

Detailed Description

Definition at line 1081 of file CCopasiXMLParser.h.

Member Enumeration Documentation

Enum of invoked parsers

Enumerator
ListOfSubstrates 
Substrate 

Definition at line 1089 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

CCopasiXMLParser::ListOfSubstratesElement::ListOfSubstratesElement ( CCopasiXMLParser parser,
SCopasiXMLParserCommon common 
)
CCopasiXMLParser::ListOfSubstratesElement::~ListOfSubstratesElement ( )
virtual

Destructor

Definition at line 4024 of file CCopasiXMLParser.cpp.

Member Function Documentation

void CCopasiXMLParser::ListOfSubstratesElement::end ( const XML_Char *  pszName)
virtual

End element handler

Parameters
constXML_Char *pszName

Definition at line 4070 of file CCopasiXMLParser.cpp.

References CCopasiMessage::EXCEPTION, MCXML, CExpatTemplate< CExpat >::mParser, START_ELEMENT, and UNKNOWN_ELEMENT.

4071 {
4072  switch (mCurrentElement)
4073  {
4074  case ListOfSubstrates:
4075 
4076  if (strcmp(pszName, "ListOfSubstrates"))
4078  pszName, "ListOfSubstrates", mParser.getCurrentLineNumber());
4079 
4082 
4083  /* Tell the parent element we are done. */
4084  mParser.onEndElement(pszName);
4085  break;
4086 
4087  case Substrate:
4088 
4089  if (strcmp(pszName, "Substrate"))
4091  pszName, "Substrate", mParser.getCurrentLineNumber());
4092 
4094  break;
4095 
4096  case UNKNOWN_ELEMENT:
4097  mCurrentElement = mLastKnownElement;
4098  break;
4099 
4100  default:
4102  pszName, "???", mParser.getCurrentLineNumber());
4103  break;
4104  }
4105 
4106  return;
4107 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfSubstratesElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 4029 of file CCopasiXMLParser.cpp.

References CCopasiMessage::EXCEPTION, CCopasiXMLParser::mCommon, MCXML, CExpatTemplate< CExpat >::mParser, and UNKNOWN_ELEMENT.

4031 {
4032  mCurrentElement++; /* We should always be on the next element */
4033 
4034  switch (mCurrentElement)
4035  {
4036  case ListOfSubstrates:
4037 
4038  if (strcmp(pszName, "ListOfSubstrates"))
4040  pszName, "ListOfSubstrates", mParser.getCurrentLineNumber());
4041 
4042  break;
4043 
4044  case Substrate:
4045 
4046  if (strcmp(pszName, "Substrate"))
4048  pszName, "Substrate", mParser.getCurrentLineNumber());
4049 
4050  /* If we do not have a Substrate element handler we create one. */
4051  if (!mpCurrentHandler)
4052  mpCurrentHandler = new SubstrateElement(mParser, mCommon);
4053 
4054  /* Push the Substrate element handler on the stack and call it. */
4056  mpCurrentHandler->start(pszName, papszAttrs);
4057  break;
4058 
4059  default:
4063  mParser.onStartElement(pszName, papszAttrs);
4064  break;
4065  }
4066 
4067  return;
4068 }
UnknownElement mUnknownElement
#define MCXML
#define UNKNOWN_ELEMENT
virtual void onStartElement(const XML_Char *pszName, const XML_Char **papszAttrs)
void pushElementHandler(CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > *elementHandler)
virtual void start(const XML_Char *C_UNUSED(pszName), const XML_Char **C_UNUSED(papszAttrs))
Definition: CXMLHandler.h:87
int getCurrentLineNumber() const
Definition: CExpat.h:470

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