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

Public Member Functions

virtual void end (const XML_Char *pszName)
 
 ListOfAssignmentsElement (CCopasiXMLParser &parser, SCopasiXMLParserCommon &common)
 
virtual void start (const XML_Char *pszName, const XML_Char **papszAttrs)
 
virtual ~ListOfAssignmentsElement ()
 
- 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 { ListOfAssignments = 0, Assignment }
 

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 1541 of file CCopasiXMLParser.h.

Member Enumeration Documentation

Enum of invoked parsers

Enumerator
ListOfAssignments 
Assignment 

Definition at line 1549 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 3477 of file CCopasiXMLParser.cpp.

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

3478 {
3479  switch (mCurrentElement)
3480  {
3481  case ListOfAssignments:
3482 
3483  if (strcmp(pszName, "ListOfAssignments"))
3485  pszName, "ListOfAssignments", mParser.getCurrentLineNumber());
3486 
3489 
3490  /* Tell the parent element we are done. */
3491  mParser.onEndElement(pszName);
3492  break;
3493 
3494  case Assignment:
3495 
3496  if (strcmp(pszName, "Assignment"))
3498  pszName, "Assignment", mParser.getCurrentLineNumber());
3499 
3501  break;
3502 
3503  case UNKNOWN_ELEMENT:
3504  mCurrentElement = mLastKnownElement;
3505  break;
3506 
3507  default:
3509  pszName, "???", mParser.getCurrentLineNumber());
3510  break;
3511  }
3512 
3513  return;
3514 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfAssignmentsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 3434 of file CCopasiXMLParser.cpp.

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

3436 {
3437  mCurrentElement++; /* We should always be on the next element */
3438 
3439  switch (mCurrentElement)
3440  {
3441  case ListOfAssignments:
3442 
3443  if (strcmp(pszName, "ListOfAssignments"))
3445  pszName, "ListOfAssignments", mParser.getCurrentLineNumber());
3446 
3447  break;
3448 
3449  case Assignment:
3450 
3451  if (strcmp(pszName, "Assignment"))
3453  pszName, "Assignment", mParser.getCurrentLineNumber());
3454 
3455  /* If we do not have a function element handler we create one. */
3456  if (!mpCurrentHandler)
3457  {
3458  mpCurrentHandler = new AssignmentElement(mParser, mCommon);
3459  }
3460 
3461  /* Push the Metabolite element handler on the stack and call it. */
3463  mpCurrentHandler->start(pszName, papszAttrs);
3464  break;
3465 
3466  default:
3470  mParser.onStartElement(pszName, papszAttrs);
3471  break;
3472  }
3473 
3474  return;
3475 }
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: