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

Public Member Functions

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

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

Member Enumeration Documentation

Enumerator
ListOfPlots 
PlotSpecification 

Definition at line 2100 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 5584 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 5636 of file CCopasiXMLParser.cpp.

References CCopasiVectorN< CType >::add(), CCopasiMessage::EXCEPTION, CCopasiXMLParser::mCommon, MCXML, CExpatTemplate< CExpat >::mParser, SCopasiXMLParserCommon::pCurrentPlot, SCopasiXMLParserCommon::pCurrentPlotItem, SCopasiXMLParserCommon::pPlotList, START_ELEMENT, and UNKNOWN_ELEMENT.

5637 {
5638  switch (mCurrentElement)
5639  {
5640  case ListOfPlots:
5641 
5642  if (strcmp(pszName, "ListOfPlots"))
5644  pszName, "ListOfPlots", mParser.getCurrentLineNumber());
5645 
5648  mParser.onEndElement(pszName);
5649  break;
5650 
5651  case PlotSpecification:
5652 
5653  if (strcmp(pszName, "PlotSpecification"))
5655  pszName, "PlotSpecification", mParser.getCurrentLineNumber());
5656 
5657  // add mCommon.pCurrentPlot to the listOfPlots and set
5658  // mCommon.pCurrentPlot to NULL
5660  delete mCommon.pCurrentPlot;
5661  mCommon.pCurrentPlot = NULL;
5662  mCommon.pCurrentPlotItem = NULL;
5664  break;
5665 
5666  case UNKNOWN_ELEMENT:
5668  break;
5669 
5670  default:
5672  pszName, "???", mParser.getCurrentLineNumber());
5673  break;
5674  }
5675 
5676  return;
5677 }
CPlotSpecification * pCurrentPlot
#define START_ELEMENT
COutputDefinitionVector * pPlotList
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
virtual bool add(const CType &src)
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfPlotsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 5589 of file CCopasiXMLParser.cpp.

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

5591 {
5592  mCurrentElement++; /* We should always be on the next element */
5593 
5594  switch (mCurrentElement)
5595  {
5596  case ListOfPlots:
5597 
5598  if (strcmp(pszName, "ListOfPlots"))
5600  pszName, "ListOfPlots", mParser.getCurrentLineNumber());
5601 
5602  if (!mCommon.pPlotList)
5603  {
5605  }
5606 
5607  break;
5608 
5609  case PlotSpecification:
5610 
5611  if (strcmp(pszName, "PlotSpecification"))
5613  pszName, "PlotSpecification", mParser.getCurrentLineNumber());
5614 
5615  // If we do not have a plot specification element handler, we create one
5616  if (!mpCurrentHandler)
5617  {
5618  mpCurrentHandler = new PlotSpecificationElement(mParser, mCommon);
5619  }
5620 
5622  mpCurrentHandler->start(pszName, papszAttrs);
5623  break;
5624 
5625  default:
5629  mParser.onStartElement(pszName, papszAttrs);
5630  break;
5631  }
5632 
5633  return;
5634 }
UnknownElement mUnknownElement
COutputDefinitionVector * pPlotList
#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: