Isis Developer Reference
XmlStackedHandler.h
Go to the documentation of this file.
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:
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
Isis::XmlStackedHandler::~XmlStackedHandler
~XmlStackedHandler()
Definition: XmlStackedHandler.cpp:23
QXmlDefaultHandler
Isis::XmlStackedHandler::XmlStackedHandler
XmlStackedHandler()
Definition: XmlStackedHandler.cpp:17
Isis::XmlStackedHandler::reader
XmlStackedHandlerReader * reader()
Definition: XmlStackedHandler.cpp:70
Isis::XmlStackedHandler::startElement
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Definition: XmlStackedHandler.cpp:44
Isis::XmlStackedHandlerReader
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:30
Isis::XmlStackedHandler::fatalError
bool fatalError(const QXmlParseException &exception)
Definition: XmlStackedHandler.cpp:80
Isis::XmlStackedHandlerReader::topContentHandler
XmlStackedHandler * topContentHandler()
Definition: XmlStackedHandlerReader.cpp:71
Isis::XmlStackedHandler::endElement
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Definition: XmlStackedHandler.cpp:55
ASSERT
#define ASSERT(x)
Definition: IsisDebug.h:134
Isis::XmlStackedHandler::setReader
virtual void setReader(XmlStackedHandlerReader *)
Definition: XmlStackedHandler.cpp:29
Isis::XmlStackedHandler
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:118
Isis::XmlStackedHandlerReader::popContentHandler
virtual void popContentHandler()
Definition: XmlStackedHandlerReader.cpp:27
Isis::XmlStackedHandler::switchToNewHandler
void switchToNewHandler(XmlStackedHandler *nextHandler)
Switch to a new content handler and continue processing using the new handler.
Definition: XmlStackedHandler.cpp:38
IsisDebug.h
XmlStackedHandlerReader.h
XmlStackedHandler.h
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16