Isis Developer Reference
XmlStackedHandler.h
Go to the documentation of this file.
1#ifndef XmlStackedHandler_H
2#define XmlStackedHandler_H
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include <QXmlSimpleReader>
11
12template <typename T> class QStack;
13
14class QXmlParseException;
15namespace 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
XML Handler that parses XMLs in a stack-oriented way.
Definition XmlStackedHandler.h:118
bool fatalError(const QXmlParseException &exception)
Definition XmlStackedHandler.cpp:78
~XmlStackedHandler()
Definition XmlStackedHandler.cpp:22
XmlStackedHandler()
Definition XmlStackedHandler.cpp:16
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Definition XmlStackedHandler.cpp:43
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Definition XmlStackedHandler.cpp:54
virtual void setReader(XmlStackedHandlerReader *)
Definition XmlStackedHandler.cpp:28
void switchToNewHandler(XmlStackedHandler *nextHandler)
Switch to a new content handler and continue processing using the new handler.
Definition XmlStackedHandler.cpp:37
XmlStackedHandlerReader * reader()
Definition XmlStackedHandler.cpp:68
Manage a stack of content handlers for reading XML files.
Definition XmlStackedHandlerReader.h:30
This is free and unencumbered software released into the public domain.
Definition Calculator.h:17
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16