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

Public Member Functions

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

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

Member Enumeration Documentation

Enumerator
ListOfLocalStyles 
LocalStyle 

Definition at line 4488 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 13847 of file CCopasiXMLParser.cpp.

References pdelete.

13848 {
13850 }
#define pdelete(p)
Definition: copasi.h:215

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 13891 of file CCopasiXMLParser.cpp.

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

13892 {
13893  switch (mCurrentElement)
13894  {
13895  case ListOfLocalStyles:
13896 
13897  if (strcmp(pszName, "ListOfStyles"))
13899  pszName, "ListOfStyles", mParser.getCurrentLineNumber());
13900 
13902 
13903  //reset handler
13905  //call parent handler
13906  mParser.onEndElement(pszName);
13907  break;
13908 
13909  case LocalStyle:
13910 
13911  if (strcmp(pszName, "Style"))
13913  pszName, "Style", mParser.getCurrentLineNumber());
13914 
13915  //tell the handler where to continue
13917 
13918  //no need to delete Handler (since it is the only one the destructor
13919  //will handle it)
13920  break;
13921 
13922  case UNKNOWN_ELEMENT:
13923  mCurrentElement = mLastKnownElement;
13924  break;
13925 
13926  default:
13928  pszName, "???", mParser.getCurrentLineNumber());
13929  break;
13930  }
13931 
13932  return;
13933 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfLocalStylesElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 13852 of file CCopasiXMLParser.cpp.

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

13854 {
13855  mCurrentElement++; /* We should always be on the next element */
13856 
13857  switch (mCurrentElement)
13858  {
13859  case ListOfLocalStyles:
13860 
13861  if (strcmp(pszName, "ListOfStyles"))
13863  pszName, "ListOfStyles", mParser.getCurrentLineNumber());
13864 
13865  break;
13866 
13867  case LocalStyle:
13868 
13869  if (!strcmp(pszName, "Style"))
13870  {
13871  if (!mpCurrentHandler)
13872  mpCurrentHandler = new LocalStyleElement(mParser, mCommon);
13873 
13875  mpCurrentHandler->start(pszName, papszAttrs);
13876  }
13877 
13878  break;
13879 
13880  default:
13884  mParser.onStartElement(pszName, papszAttrs);
13885  break;
13886  }
13887 
13888  return;
13889 }
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: