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

Public Member Functions

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

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

Member Enumeration Documentation

Enum of invoked parsers

Enumerator
ListOfModelValues 
ModelValue 

Definition at line 1507 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 2757 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 2803 of file CCopasiXMLParser.cpp.

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

2804 {
2805  switch (mCurrentElement)
2806  {
2807  case ListOfModelValues:
2808 
2809  if (strcmp(pszName, "ListOfModelValues"))
2811  pszName, "ListOfModelValues", mParser.getCurrentLineNumber());
2812 
2815 
2816  /* Tell the parent element we are done. */
2817  mParser.onEndElement(pszName);
2818  break;
2819 
2820  case ModelValue:
2821 
2822  if (strcmp(pszName, "ModelValue"))
2824  pszName, "ModelValue", mParser.getCurrentLineNumber());
2825 
2827  break;
2828 
2829  case UNKNOWN_ELEMENT:
2830  mCurrentElement = mLastKnownElement;
2831  break;
2832 
2833  default:
2835  pszName, "???", mParser.getCurrentLineNumber());
2836  break;
2837  }
2838 
2839  return;
2840 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfModelValuesElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 2762 of file CCopasiXMLParser.cpp.

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

2764 {
2765  mCurrentElement++; /* We should always be on the next element */
2766 
2767  switch (mCurrentElement)
2768  {
2769  case ListOfModelValues:
2770 
2771  if (strcmp(pszName, "ListOfModelValues"))
2773  pszName, "ListOfModelValues", mParser.getCurrentLineNumber());
2774 
2775  break;
2776 
2777  case ModelValue:
2778 
2779  if (strcmp(pszName, "ModelValue"))
2781  pszName, "ModelValue", mParser.getCurrentLineNumber());
2782 
2783  /* If we do not have a function element handler we create one. */
2784  if (!mpCurrentHandler)
2785  mpCurrentHandler = new ModelValueElement(mParser, mCommon);
2786 
2787  /* Push the Metabolite element handler on the stack and call it. */
2789  mpCurrentHandler->start(pszName, papszAttrs);
2790  break;
2791 
2792  default:
2796  mParser.onStartElement(pszName, papszAttrs);
2797  break;
2798  }
2799 
2800  return;
2801 }
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: