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

Public Member Functions

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

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

Member Enumeration Documentation

Constructor & Destructor Documentation

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

Destructor

Definition at line 13942 of file CCopasiXMLParser.cpp.

References pdelete.

13943 {
13945 }
#define pdelete(p)
Definition: copasi.h:215

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 13988 of file CCopasiXMLParser.cpp.

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

13989 {
13990  switch (mCurrentElement)
13991  {
13992  case ListOfGlobalStyles:
13993 
13994  if (strcmp(pszName, "ListOfStyles"))
13996  pszName, "ListOfStyles", mParser.getCurrentLineNumber());
13997 
13999 
14000  //reset handler
14002  //call parent handler
14003  mParser.onEndElement(pszName);
14004  break;
14005 
14006  case GlobalStyle:
14007 
14008  if (strcmp(pszName, "Style"))
14010  pszName, "Style", mParser.getCurrentLineNumber());
14011 
14012  //tell the handler where to continue
14014 
14015  //no need to delete Handler (since it is the only one the destructor
14016  //will handle it)
14017  break;
14018 
14019  case UNKNOWN_ELEMENT:
14020  mCurrentElement = mLastKnownElement;
14021  break;
14022 
14023  default:
14025  pszName, "???", mParser.getCurrentLineNumber());
14026  break;
14027  }
14028 
14029  return;
14030 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfGlobalStylesElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 13947 of file CCopasiXMLParser.cpp.

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

13949 {
13950  mCurrentElement++; /* We should always be on the next element */
13951 
13952  switch (mCurrentElement)
13953  {
13954  case ListOfGlobalStyles:
13955 
13956  if (strcmp(pszName, "ListOfStyles"))
13958  pszName, "ListOfStyles", mParser.getCurrentLineNumber());
13959 
13960  break;
13961 
13962  case GlobalStyle:
13963 
13964  if (!strcmp(pszName, "Style"))
13965  {
13966  //only one type of tags may occur here, so if the handler exists
13967  //it must be the correct one
13968  if (!mpCurrentHandler)
13969  mpCurrentHandler = new GlobalStyleElement(mParser, mCommon);
13970 
13972  mpCurrentHandler->start(pszName, papszAttrs);
13973  }
13974 
13975  break;
13976 
13977  default:
13981  mParser.onStartElement(pszName, papszAttrs);
13982  break;
13983  }
13984 
13985  return;
13986 }
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: