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

Public Member Functions

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

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

Member Enumeration Documentation

Enum of invoked parsers

Enumerator
ListOfModifiers 
Modifier 

Definition at line 923 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 4364 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 4410 of file CCopasiXMLParser.cpp.

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

4411 {
4412  switch (mCurrentElement)
4413  {
4414  case ListOfModifiers:
4415 
4416  if (strcmp(pszName, "ListOfModifiers"))
4418  pszName, "ListOfModifiers", mParser.getCurrentLineNumber());
4419 
4422 
4423  /* Tell the parent element we are done. */
4424  mParser.onEndElement(pszName);
4425  break;
4426 
4427  case Modifier:
4428 
4429  if (strcmp(pszName, "Modifier"))
4431  pszName, "Modifier", mParser.getCurrentLineNumber());
4432 
4434  break;
4435 
4436  case UNKNOWN_ELEMENT:
4437  mCurrentElement = mLastKnownElement;
4438  break;
4439 
4440  default:
4442  pszName, "???", mParser.getCurrentLineNumber());
4443  break;
4444  }
4445 
4446  return;
4447 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfModifiersElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 4369 of file CCopasiXMLParser.cpp.

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

4371 {
4372  mCurrentElement++; /* We should always be on the next element */
4373 
4374  switch (mCurrentElement)
4375  {
4376  case ListOfModifiers:
4377 
4378  if (strcmp(pszName, "ListOfModifiers"))
4380  pszName, "ListOfModifiers", mParser.getCurrentLineNumber());
4381 
4382  break;
4383 
4384  case Modifier:
4385 
4386  if (strcmp(pszName, "Modifier"))
4388  pszName, "Modifier", mParser.getCurrentLineNumber());
4389 
4390  /* If we do not have a Modifier element handler we create one. */
4391  if (!mpCurrentHandler)
4392  mpCurrentHandler = new ModifierElement(mParser, mCommon);
4393 
4394  /* Push the Modifier element handler on the stack and call it. */
4396  mpCurrentHandler->start(pszName, papszAttrs);
4397  break;
4398 
4399  default:
4403  mParser.onStartElement(pszName, papszAttrs);
4404  break;
4405  }
4406 
4407  return;
4408 }
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: