COPASI API  4.16.103
ListOfUnsupportedAnnotations.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/xml/ListOfUnsupportedAnnotations.h,v $
3 // $Revision: 1.1 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2012/05/25 12:13:29 $
7 // End CVS Header
8 
9 // Copyright (C) 2012 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 /*
15  * ListOfUnsupportedAnnotations.h
16  *
17  * Created on: May 24, 2012
18  * Author: shoops
19  */
20 
21 #ifndef COPASI_ListOfUnsupportedAnnotations
22 #define COPASI_ListOfUnsupportedAnnotations
23 
25  public CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon >
26 {
27 private:
28  /**
29  * Enum of invoked parsers
30  */
31  enum Element
32  {
35  };
36 
37  // Operations
38 public:
39  /**
40  * Constructor
41  */
43  SCopasiXMLParserCommon & common);
44 
45  /**
46  * Destructor
47  */
49 
50  /**
51  * Start element handler
52  * @param const XML_Char *pszName
53  * @param const XML_Char **papszAttrs
54  */
55  virtual void start(const XML_Char *pszName,
56  const XML_Char **papszAttrs);
57 
58  /**
59  * End element handler
60  * @param const XML_Char *pszName
61  */
62  virtual void end(const XML_Char *pszName);
63 
64  /**
65  * Retrieve the name
66  * @return const std::string & name
67  */
68  const std::string & getName() const;
69 
70  /**
71  * Retrieve the XML
72  * @return std::string XML
73  */
74  std::string getXML() const;
75 
76 private:
77  /**
78  * The name of the unsupported annotation
79  */
80  std::string mName;
81 
82  /**
83  * String stream to handle XML content
84  */
85  std::ostringstream mXML;
86 
87  /**
88  * The level of nested XML elements.
89  */
90  size_t mLevel;
91 
92  /**
93  * Information whether an element is empty
94  */
95  std::stack< bool > mElementEmpty;
96 };
97 
99  public CXMLElementHandler< CCopasiXMLParser, SCopasiXMLParserCommon >
100 {
101  // Attributes
102 private:
103  /**
104  * Enum of invoked parsers
105  */
106  enum Element
107  {
110  };
111 
112  // Operations
113 public:
114  /**
115  * Constructor
116  */
118  SCopasiXMLParserCommon & common);
119 
120  /**
121  * Destructor
122  */
124 
125  /**
126  * Start element handler
127  * @param const XML_Char *pszName
128  * @param const XML_Char **papszAttrs
129  */
130  virtual void start(const XML_Char *pszName,
131  const XML_Char **papszAttrs);
132 
133  /**
134  * End element handler
135  * @param const XML_Char *pszName
136  */
137  virtual void end(const XML_Char *pszName);
138 
139  /**
140  * Retrieve the unsupported annotations.
141  */
143 
144 private:
145  /**
146  * The list of unsupported annotations.
147  */
149 
150  /**
151  * A pointer to the UnsupportedAnnotation element handler
152  */
154 };
155 
156 #endif // COPASI_ListOfUnsupportedAnnotations
virtual void start(const XML_Char *pszName, const XML_Char **papszAttrs)
CAnnotation::UnsupportedAnnotation mUnsupportedAnnotations
UnsupportedAnnotationElement(CCopasiXMLParser &parser, SCopasiXMLParserCommon &common)
UnsupportedAnnotationElement * mpUnsupportedAnnotationElement
const CAnnotation::UnsupportedAnnotation & getUnsupportedAnnotations() const
std::string getXML() const
ListOfUnsupportedAnnotationsElement(CCopasiXMLParser &parser, SCopasiXMLParserCommon &common)
virtual void start(const XML_Char *pszName, const XML_Char **papszAttrs)
virtual void end(const XML_Char *pszName)
std::map< std::string, std::string > UnsupportedAnnotation
Definition: CAnnotation.h:17
const std::string & getName() const
virtual void end(const XML_Char *pszName)