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

Public Member Functions

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

Private Attributes

std::set< size_t > mEventOrders
 

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

Member Enumeration Documentation

Enum of invoked parsers

Enumerator
ListOfEvents 
Event 

Definition at line 1647 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 3095 of file CCopasiXMLParser.cpp.

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 3142 of file CCopasiXMLParser.cpp.

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

3143 {
3144  switch (mCurrentElement)
3145  {
3146  case ListOfEvents:
3147 
3148  if (strcmp(pszName, "ListOfEvents"))
3150  pszName, "ListOfEvents", mParser.getCurrentLineNumber());
3151 
3154 
3155  /* Tell the parent element we are done. */
3156  mParser.onEndElement(pszName);
3157  break;
3158 
3159  case Event:
3160 
3161  if (strcmp(pszName, "Event"))
3163  pszName, "Event", mParser.getCurrentLineNumber());
3164 
3166  break;
3167 
3168  case UNKNOWN_ELEMENT:
3169  mCurrentElement = mLastKnownElement;
3170  break;
3171 
3172  default:
3174  pszName, "???", mParser.getCurrentLineNumber());
3175  break;
3176  }
3177 
3178  return;
3179 }
#define START_ELEMENT
#define MCXML
virtual void onEndElement(const XML_Char *pszName)
#define UNKNOWN_ELEMENT
int getCurrentLineNumber() const
Definition: CExpat.h:470
void CCopasiXMLParser::ListOfEventsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 3100 of file CCopasiXMLParser.cpp.

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

3102 {
3103  mCurrentElement++; /* We should always be on the next element */
3104 
3105  switch (mCurrentElement)
3106  {
3107  case ListOfEvents:
3108 
3109  if (strcmp(pszName, "ListOfEvents"))
3111  pszName, "ListOfEvents", mParser.getCurrentLineNumber());
3112 
3113  mEventOrders.clear();
3114  break;
3115 
3116  case Event:
3117 
3118  if (strcmp(pszName, "Event"))
3120  pszName, "Event", mParser.getCurrentLineNumber());
3121 
3122  /* If we do not have a function element handler we create one. */
3123  if (!mpCurrentHandler)
3124  mpCurrentHandler = new EventElement(mParser, mCommon);
3125 
3126  /* Push the Metabolite element handler on the stack and call it. */
3128  mpCurrentHandler->start(pszName, papszAttrs);
3129  break;
3130 
3131  default:
3135  mParser.onStartElement(pszName, papszAttrs);
3136  break;
3137  }
3138 
3139  return;
3140 }
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

Member Data Documentation

std::set< size_t > CCopasiXMLParser::ListOfEventsElement::mEventOrders
private

A set of event orders used to enforce uniqueness

Definition at line 1656 of file CCopasiXMLParser.h.


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