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

Public Member Functions

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

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

Member Enumeration Documentation

Enumerator
ListOfLineEndings 
LineEnding 

Definition at line 4000 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 13752 of file CCopasiXMLParser.cpp.

References pdelete.

13753 {
13755 }
#define pdelete(p)
Definition: copasi.h:215

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 13796 of file CCopasiXMLParser.cpp.

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

13797 {
13798  switch (mCurrentElement)
13799  {
13800  case ListOfLineEndings:
13801 
13802  if (strcmp(pszName, "ListOfLineEndings"))
13804  pszName, "ListOfLineEndings", mParser.getCurrentLineNumber());
13805 
13807 
13808  //reset handler
13810  //call parent handler
13811  mParser.onEndElement(pszName);
13812  break;
13813 
13814  case LineEnding:
13815 
13816  if (strcmp(pszName, "LineEnding"))
13818  pszName, "LineEnding", mParser.getCurrentLineNumber());
13819 
13820  //tell the handler where to continue
13822 
13823  //no need to delete Handler (since it is the only one the destructor
13824  //will handle it)
13825  break;
13826 
13827  case UNKNOWN_ELEMENT:
13828  mCurrentElement = mLastKnownElement;
13829  break;
13830 
13831  default:
13833  pszName, "???", mParser.getCurrentLineNumber());
13834  break;
13835  }
13836 
13837  return;
13838 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfLineEndingsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 13757 of file CCopasiXMLParser.cpp.

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

13759 {
13760  mCurrentElement++; /* We should always be on the next element */
13761 
13762  switch (mCurrentElement)
13763  {
13764  case ListOfLineEndings:
13765 
13766  if (strcmp(pszName, "ListOfLineEndings"))
13768  pszName, "ListOfLineEndings", mParser.getCurrentLineNumber());
13769 
13770  break;
13771 
13772  case LineEnding:
13773 
13774  if (!strcmp(pszName, "LineEnding"))
13775  {
13776  if (!mpCurrentHandler)
13777  mpCurrentHandler = new LineEndingElement(mParser, mCommon);
13778 
13780  mpCurrentHandler->start(pszName, papszAttrs);
13781  }
13782 
13783  break;
13784 
13785  default:
13789  mParser.onStartElement(pszName, papszAttrs);
13790  break;
13791  }
13792 
13793  return;
13794 }
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: