COPASI API  4.16.103
Public Member Functions | Private Types | Private Attributes | List of all members
CCopasiXMLParser::ListOfUnsupportedAnnotationsElement Class Reference

#include <CCopasiXMLParser.h>

Inheritance diagram for CCopasiXMLParser::ListOfUnsupportedAnnotationsElement:
Inheritance graph
[legend]
Collaboration diagram for CCopasiXMLParser::ListOfUnsupportedAnnotationsElement:
Collaboration graph
[legend]

Public Member Functions

virtual void end (const XML_Char *pszName)
 
const
CAnnotation::UnsupportedAnnotation
getUnsupportedAnnotations () const
 
 ListOfUnsupportedAnnotationsElement (CCopasiXMLParser &parser, SCopasiXMLParserCommon &common)
 
virtual void start (const XML_Char *pszName, const XML_Char **papszAttrs)
 
virtual ~ListOfUnsupportedAnnotationsElement ()
 
- 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 { ListOfUnsupportedAnnotations = 0, UnsupportedAnnotation }
 

Private Attributes

UnsupportedAnnotationElementmpUnsupportedAnnotationElement
 
CAnnotation::UnsupportedAnnotation mUnsupportedAnnotations
 

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

Member Enumeration Documentation

Enum of invoked parsers

Enumerator
ListOfUnsupportedAnnotations 
UnsupportedAnnotation 

Definition at line 107 of file CCopasiXMLParser.h.

Constructor & Destructor Documentation

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

Destructor

Definition at line 194 of file ListOfUnsupportedAnnotations.cpp.

References pdelete.

195 {
197 }
#define pdelete(p)
Definition: copasi.h:215
UnsupportedAnnotationElement * mpUnsupportedAnnotationElement

Member Function Documentation

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

End element handler

Parameters
constXML_Char *pszName

Definition at line 254 of file ListOfUnsupportedAnnotations.cpp.

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

255 {
256  switch (mCurrentElement)
257  {
259 
260  if (strcmp(pszName, "ListOfUnsupportedAnnotations"))
262  pszName, "ListOfUnsupportedAnnotations", mParser.getCurrentLineNumber());
263 
267 
268  /* Tell the parent element we are done. */
269  mParser.onEndElement(pszName);
270  break;
271 
273 
274  if (strcmp(pszName, "UnsupportedAnnotation"))
276  pszName, "UnsupportedAnnotation", mParser.getCurrentLineNumber());
277 
278  if (mpUnsupportedAnnotationElement != NULL)
279  {
282  }
283 
286  break;
287 
288  case UNKNOWN_ELEMENT:
290  break;
291 
292  default:
294  pszName, "???", mParser.getCurrentLineNumber());
295  break;
296  }
297 
298  return;
299 }
#define MCXML
#define START_ELEMENT
virtual void onEndElement(const XML_Char *pszName)
CAnnotation::UnsupportedAnnotation mUnsupportedAnnotations
#define UNKNOWN_ELEMENT
UnsupportedAnnotationElement * mpUnsupportedAnnotationElement
int getCurrentLineNumber() const
Definition: CExpat.h:470
const CAnnotation::UnsupportedAnnotation & CCopasiXMLParser::ListOfUnsupportedAnnotationsElement::getUnsupportedAnnotations ( ) const

Retrieve the unsupported annotations.

Definition at line 301 of file ListOfUnsupportedAnnotations.cpp.

302 {
304 }
CAnnotation::UnsupportedAnnotation mUnsupportedAnnotations
void CCopasiXMLParser::ListOfUnsupportedAnnotationsElement::start ( const XML_Char *  pszName,
const XML_Char **  papszAttrs 
)
virtual

Start element handler

Parameters
constXML_Char *pszName
constXML_Char **papszAttrs

Definition at line 200 of file ListOfUnsupportedAnnotations.cpp.

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

202 {
203  mpCurrentHandler = NULL;
205 
206  while (mpCurrentHandler == NULL)
207  {
208  mCurrentElement++; /* We should always be on the next element */
209 
210  switch (mCurrentElement)
211  {
213 
214  if (strcmp(pszName, "ListOfUnsupportedAnnotations"))
216  pszName, "ListOfUnsupportedAnnotations", mParser.getCurrentLineNumber());
217 
219  mUnsupportedAnnotations.clear();
220 
221  return;
222 
224 
225  if (!strcmp(pszName, "UnsupportedAnnotation"))
226  {
227  /* If we do not have a ModelParameterSet element handler we create one. */
230 
232  }
233 
234  break;
235 
236  default:
239  break;
240  }
241  }
242 
244 
246  {
247  mLastKnownElement = mCurrentElement;
248  }
249 
250  mParser.onStartElement(pszName, papszAttrs);
251 }
UnknownElement mUnknownElement
#define MCXML
CAnnotation::UnsupportedAnnotation mUnsupportedAnnotations
#define UNKNOWN_ELEMENT
virtual void onStartElement(const XML_Char *pszName, const XML_Char **papszAttrs)
void pushElementHandler(CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon > *elementHandler)
UnsupportedAnnotationElement * mpUnsupportedAnnotationElement
int getCurrentLineNumber() const
Definition: CExpat.h:470

Member Data Documentation

UnsupportedAnnotationElement* CCopasiXMLParser::ListOfUnsupportedAnnotationsElement::mpUnsupportedAnnotationElement
private

A pointer to the UnsupportedAnnotation element handler

Definition at line 154 of file CCopasiXMLParser.h.

CAnnotation::UnsupportedAnnotation CCopasiXMLParser::ListOfUnsupportedAnnotationsElement::mUnsupportedAnnotations
private

The list of unsupported annotations.

Definition at line 149 of file CCopasiXMLParser.h.


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