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

Public Member Functions

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

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

Member Enumeration Documentation

Enum of invoked parsers

Enumerator
ListOfConstants 
Constant 

Definition at line 840 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 4534 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 4581 of file CCopasiXMLParser.cpp.

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

4582 {
4583  switch (mCurrentElement)
4584  {
4585  case ListOfConstants:
4586 
4587  if (strcmp(pszName, "ListOfConstants"))
4589  pszName, "ListOfConstants", mParser.getCurrentLineNumber());
4590 
4593 
4594  /* Tell the parent element we are done. */
4595  mParser.onEndElement(pszName);
4596  break;
4597 
4598  case Constant:
4599 
4600  if (strcmp(pszName, "Constant"))
4602  pszName, "Constant", mParser.getCurrentLineNumber());
4603 
4605  break;
4606 
4607  case UNKNOWN_ELEMENT:
4608  mCurrentElement = mLastKnownElement;
4609  break;
4610 
4611  default:
4613  pszName, "???", mParser.getCurrentLineNumber());
4614  break;
4615  }
4616 
4617  return;
4618 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfConstantsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 4539 of file CCopasiXMLParser.cpp.

References CCopasiParameterGroup::clear(), CCopasiMessage::EXCEPTION, CReaction::getParameters(), CCopasiXMLParser::mCommon, MCXML, CExpatTemplate< CExpat >::mParser, SCopasiXMLParserCommon::pReaction, and UNKNOWN_ELEMENT.

4541 {
4542  mCurrentElement++; /* We should always be on the next element */
4543 
4544  switch (mCurrentElement)
4545  {
4546  case ListOfConstants:
4547 
4548  if (strcmp(pszName, "ListOfConstants"))
4550  pszName, "ListOfConstants", mParser.getCurrentLineNumber());
4551 
4553  break;
4554 
4555  case Constant:
4556 
4557  if (strcmp(pszName, "Constant"))
4559  pszName, "Constant", mParser.getCurrentLineNumber());
4560 
4561  /* If we do not have a Constant element handler we create one. */
4562  if (!mpCurrentHandler)
4563  mpCurrentHandler = new ConstantElement(mParser, mCommon);
4564 
4565  /* Push the Constant element handler on the stack and call it. */
4567  mpCurrentHandler->start(pszName, papszAttrs);
4568  break;
4569 
4570  default:
4574  mParser.onStartElement(pszName, papszAttrs);
4575  break;
4576  }
4577 
4578  return;
4579 }
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
const CCopasiParameterGroup & getParameters() const
Definition: CReaction.cpp:333
int getCurrentLineNumber() const
Definition: CExpat.h:470

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