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

Public Member Functions

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

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

Member Enumeration Documentation

Enumerator
ListOfPlotItems 
PlotItem 

Definition at line 2010 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 5402 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 5449 of file CCopasiXMLParser.cpp.

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

5450 {
5451  switch (mCurrentElement)
5452  {
5453  case ListOfPlotItems:
5454 
5455  if (strcmp(pszName, "ListOfPlotItems"))
5457  pszName, "ListOfPlotItems", mParser.getCurrentLineNumber());
5458 
5461  mParser.onEndElement(pszName);
5462  break;
5463 
5464  case PlotItem:
5465 
5466  if (strcmp(pszName, "PlotItem"))
5468  pszName, "PlotItem", mParser.getCurrentLineNumber());
5469 
5472  break;
5473 
5474  case UNKNOWN_ELEMENT:
5476  break;
5477 
5478  default:
5480  pszName, "???", mParser.getCurrentLineNumber());
5481  break;
5482  }
5483 
5484  return;
5485 }
CPlotSpecification * pCurrentPlot
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfPlotItemsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 5407 of file CCopasiXMLParser.cpp.

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

5409 {
5410  mCurrentElement++; /* We should always be on the next element */
5411 
5412  switch (mCurrentElement)
5413  {
5414  case ListOfPlotItems:
5415 
5416  if (strcmp(pszName, "ListOfPlotItems"))
5418  pszName, "ListOfPlotItems", mParser.getCurrentLineNumber());
5419 
5420  break;
5421 
5422  case PlotItem:
5423 
5424  if (strcmp(pszName, "PlotItem"))
5426  pszName, "PlotItem", mParser.getCurrentLineNumber());
5427 
5428  // If we do not have a plot specification element handler, we create one
5429  if (!mpCurrentHandler)
5430  {
5431  mpCurrentHandler = new PlotItemElement(mParser, mCommon);
5432  }
5433 
5435  mpCurrentHandler->start(pszName, papszAttrs);
5436  break;
5437 
5438  default:
5442  mParser.onStartElement(pszName, papszAttrs);
5443  break;
5444  }
5445 
5446  return;
5447 }
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: