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

Public Member Functions

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

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

Member Enumeration Documentation

Object

Enumerator
Object 

Definition at line 2497 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 10290 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 10324 of file CCopasiXMLParser.cpp.

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

10325 {
10326  switch (mCurrentElement)
10327  {
10328  case Object:
10329 
10330  if (strcmp(pszName, "Object"))
10332  pszName, "Object", mParser.getCurrentLineNumber());
10333 
10336 
10337  // Tell the parent element we are done.
10338  mParser.onEndElement(pszName);
10339  break;
10340 
10341  case UNKNOWN_ELEMENT:
10343  break;
10344 
10345  default:
10347  pszName, "???", mParser.getCurrentLineNumber());
10348  break;
10349  }
10350 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ObjectElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 10295 of file CCopasiXMLParser.cpp.

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

10297 {
10298  const char *cn;
10299  mCurrentElement++; // We should always be on the next element
10300 
10301  switch (mCurrentElement)
10302  {
10303  case Object:
10304 
10305  if (strcmp(pszName, "Object"))
10307  pszName, "Object", mParser.getCurrentLineNumber());
10308 
10309  cn = mParser.getAttributeValue("cn", papszAttrs);
10310  mCommon.CharacterData = cn;
10311  break;
10312 
10313  default:
10317  mParser.onStartElement(pszName, papszAttrs);
10318  break;
10319  }
10320 
10321  return;
10322 }
UnknownElement mUnknownElement
const char * getAttributeValue(const std::string &name, const char **attributes, const bool &required=true) const
Definition: CExpat.h:685
#define MCXML
#define UNKNOWN_ELEMENT
virtual void onStartElement(const XML_Char *pszName, const XML_Char **papszAttrs)
void pushElementHandler(CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > *elementHandler)
int getCurrentLineNumber() const
Definition: CExpat.h:470

The documentation for this class was generated from the following files: