File indexing completed on 2024-04-28 07:28:53

0001 /*
0002     SPDX-FileCopyrightText: 2005 Carsten Niehaus <cniehaus@kde.org>
0003     SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef ISOTOPEPARSER_H
0007 #define ISOTOPEPARSER_H
0008 
0009 #include <QList>
0010 #include <QXmlAttributes>
0011 #include <QXmlDefaultHandler>
0012 
0013 #include "science_export.h"
0014 
0015 class Isotope;
0016 
0017 /**
0018  * @author Carsten Niehaus <cniehaus@kde.org>
0019  */
0020 class SCIENCE_EXPORT IsotopeParser : public QXmlDefaultHandler
0021 {
0022 public:
0023     /**
0024      * Constructor
0025      */
0026     IsotopeParser();
0027     ~IsotopeParser() override;
0028     bool startElement(const QString &, const QString &localName, const QString &, const QXmlAttributes &attrs) override;
0029 
0030     bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName) override;
0031 
0032     bool characters(const QString &ch) override;
0033 
0034     QList<Isotope *> getIsotopes() const;
0035 
0036 private:
0037     class Private;
0038     Private *const d;
0039 };
0040 #endif // ISOTOPEPARSER_H