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

Public Member Functions

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

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

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Definition at line 6651 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

Definition at line 6699 of file CCopasiXMLParser.cpp.

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

6700 {
6701  switch (mCurrentElement)
6702  {
6704 
6705  if (strcmp(pszName, "ListOfCompartmentGlyphs"))
6707  pszName, "ListOfCompartmentGlyphs", mParser.getCurrentLineNumber());
6708 
6710 
6711  //reset handler
6713  //call parent handler
6714  mParser.onEndElement(pszName);
6715  break;
6716 
6717  case CompartmentGlyph:
6718 
6719  if (strcmp(pszName, "CompartmentGlyph"))
6721  pszName, "CompartmentGlyph", mParser.getCurrentLineNumber());
6722 
6723  //tell the handler where to continue
6725 
6726  //no need to delete Handler (since it is the only one the destructor
6727  //will handle it)
6728  break;
6729 
6730  case UNKNOWN_ELEMENT:
6731  mCurrentElement = mLastKnownElement;
6732  break;
6733 
6734  default:
6736  pszName, "???", mParser.getCurrentLineNumber());
6737  break;
6738  }
6739 
6740  return;
6741 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfCompartmentGlyphsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Definition at line 6656 of file CCopasiXMLParser.cpp.

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

6658 {
6659  mCurrentElement++; /* We should always be on the next element */
6660 
6661  switch (mCurrentElement)
6662  {
6664 
6665  if (strcmp(pszName, "ListOfCompartmentGlyphs"))
6667  pszName, "ListOfCompartmentGlyphs", mParser.getCurrentLineNumber());
6668 
6669  break;
6670 
6671  case CompartmentGlyph:
6672 
6673  //only one type of tags may occur here, so we can throw an exception.
6674  //No need to silently ignore unknown tags here.
6675  if (!strcmp(pszName, "CompartmentGlyph"))
6676  {
6677  //only one type of tags may occur here, so if the handler exists
6678  //it must be the correct one
6679  if (!mpCurrentHandler)
6680  mpCurrentHandler = new CompartmentGlyphElement(mParser, mCommon);
6681 
6683  mpCurrentHandler->start(pszName, papszAttrs);
6684  }
6685 
6686  break;
6687 
6688  default:
6692  mParser.onStartElement(pszName, papszAttrs);
6693  break;
6694  }
6695 
6696  return;
6697 }
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: