Isis 3 Developer Reference
XmlStackedHandler.h
Go to the documentation of this file.
1 #ifndef XmlStackedHandler_H
2 #define XmlStackedHandler_H
3 
4 #include <QXmlSimpleReader>
5 
6 template <typename T> class QStack;
7 
8 class QXmlParseException;
9 namespace Isis {
10  class XmlStackedHandlerReader;
11 
113  public:
116 
117  virtual void setReader(XmlStackedHandlerReader *);
118  void switchToNewHandler(XmlStackedHandler *nextHandler);
119 
120  virtual bool startElement(const QString &namespaceURI, const QString &localName,
121  const QString &qName, const QXmlAttributes &atts);
122 
123  virtual bool endElement(const QString &namespaceURI, const QString &localName,
124  const QString &qName);
125 
126  protected:
128  const XmlStackedHandlerReader *reader() const;
129  bool fatalError(const QXmlParseException &exception);
130 
131  private:
132  Q_DISABLE_COPY(XmlStackedHandler);
133 
134  XmlStackedHandlerReader *m_reader;
135  int m_depth;
136 
137  QString m_lastStartNamespaceURI;
138  QString m_lastStartLocalName;
139  QString m_lastStartQName;
140  QXmlAttributes m_lastStartAtts;
141  };
142 }
143 
144 #endif
XmlStackedHandler()
Definition: XmlStackedHandler.cpp:11
XmlStackedHandlerReader * reader()
Definition: XmlStackedHandler.cpp:64
bool fatalError(const QXmlParseException &exception)
Definition: XmlStackedHandler.cpp:74
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Definition: XmlStackedHandler.cpp:38
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:112
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Definition: XmlStackedHandler.cpp:49
Definition: Calculator.h:32
void switchToNewHandler(XmlStackedHandler *nextHandler)
Switch to a new content handler and continue processing using the new handler.
Definition: XmlStackedHandler.cpp:32
virtual void setReader(XmlStackedHandlerReader *)
Definition: XmlStackedHandler.cpp:23
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:25
~XmlStackedHandler()
Definition: XmlStackedHandler.cpp:17