Isis 3 Programmer Reference
XmlStackedHandler.h
1 #ifndef XmlStackedHandler_H
2 #define XmlStackedHandler_H
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include <QXmlSimpleReader>
11 
12 template <typename T> class QStack;
13 
14 class QXmlParseException;
15 namespace Isis {
16  class XmlStackedHandlerReader;
17 
119  public:
122 
123  virtual void setReader(XmlStackedHandlerReader *);
124  void switchToNewHandler(XmlStackedHandler *nextHandler);
125 
126  virtual bool startElement(const QString &namespaceURI, const QString &localName,
127  const QString &qName, const QXmlAttributes &atts);
128 
129  virtual bool endElement(const QString &namespaceURI, const QString &localName,
130  const QString &qName);
131 
132  protected:
133  XmlStackedHandlerReader *reader();
134  const XmlStackedHandlerReader *reader() const;
135  bool fatalError(const QXmlParseException &exception);
136 
137  private:
138  Q_DISABLE_COPY(XmlStackedHandler);
139 
140  XmlStackedHandlerReader *m_reader;
141  int m_depth;
142 
143  QString m_lastStartNamespaceURI;
144  QString m_lastStartLocalName;
145  QString m_lastStartQName;
146  QXmlAttributes m_lastStartAtts;
147  };
148 }
149 
150 #endif
QStack
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:17
QXmlDefaultHandler
Isis::XmlStackedHandlerReader
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:30
Isis::XmlStackedHandler
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:118
Isis::XmlStackedHandler::switchToNewHandler
void switchToNewHandler(XmlStackedHandler *nextHandler)
Switch to a new content handler and continue processing using the new handler.
Definition: XmlStackedHandler.cpp:38
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16