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

Public Member Functions

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

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

Member Enumeration Documentation

Enum of invoked parsers

Enumerator
ListOfSliders 
Slider 

Definition at line 3213 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 10572 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 10623 of file CCopasiXMLParser.cpp.

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

10624 {
10625  switch (mCurrentElement)
10626  {
10627  case ListOfSliders:
10628 
10629  if (strcmp(pszName, "ListOfSliders"))
10631  pszName, "ListOfSliders", mParser.getCurrentLineNumber());
10632 
10635 
10636  /* Tell the parent element we are done. */
10637  mParser.onEndElement(pszName);
10638  break;
10639 
10640  case Slider:
10641 
10642  if (strcmp(pszName, "Slider"))
10644  pszName, "Slider", mParser.getCurrentLineNumber());
10645 
10647  break;
10648 
10649  case UNKNOWN_ELEMENT:
10650  mCurrentElement = mLastKnownElement;
10651  break;
10652 
10653  default:
10655  pszName, "???", mParser.getCurrentLineNumber());
10656  break;
10657  }
10658 
10659  return;
10660 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfSlidersElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 10577 of file CCopasiXMLParser.cpp.

References CCopasiMessage::EXCEPTION, fatalError, SCopasiXMLGUI::getSliderList(), CCopasiXMLParser::mCommon, MCXML, CExpatTemplate< CExpat >::mParser, SCopasiXMLParserCommon::pGUI, and UNKNOWN_ELEMENT.

10579 {
10580  mCurrentElement++; /* We should always be on the next element */
10581 
10582  switch (mCurrentElement)
10583  {
10584  case ListOfSliders:
10585 
10586  if (strcmp(pszName, "ListOfSliders"))
10588  pszName, "ListOfSliders", mParser.getCurrentLineNumber());
10589 
10590  if (!mCommon.pGUI->getSliderList())
10591  {
10592  fatalError();
10593  }
10594 
10595  break;
10596 
10597  case Slider:
10598 
10599  if (strcmp(pszName, "Slider"))
10601  pszName, "Slider", mParser.getCurrentLineNumber());
10602 
10603  /* If we do not have a Slider element handler we create one. */
10604  if (!mpCurrentHandler)
10605  mpCurrentHandler = new SliderElement(mParser, mCommon);
10606 
10607  /* Push the Slider element handler on the stack and call it. */
10609  mpCurrentHandler->start(pszName, papszAttrs);
10610  break;
10611 
10612  default:
10616  mParser.onStartElement(pszName, papszAttrs);
10617  break;
10618  }
10619 
10620  return;
10621 }
CCopasiVector< CSlider > * getSliderList()
UnknownElement mUnknownElement
#define fatalError()
#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: