"Fossies" - the Fresh Open Source Software Archive

Member "labplot-2.8.2/src/backend/lib/XmlStreamReader.h" (24 Feb 2021, 2896 Bytes) of package /linux/privat/labplot-2.8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "XmlStreamReader.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.8.1_vs_2.8.2.

    1 /***************************************************************************
    2     File                 : XmlStreamReader.h
    3     Project              : LabPlot
    4     Description          : XML stream parser that supports errors and warnings
    5     --------------------------------------------------------------------
    6     Copyright            : (C) 2009 Tilman Benkert (thzs@gmx.net)
    7     Copyright            : (C) 2015-2016 Alexander Semke (alexander.semke@web.de)
    8  ***************************************************************************/
    9 
   10 /***************************************************************************
   11  *                                                                         *
   12  *  This program is free software; you can redistribute it and/or modify   *
   13  *  it under the terms of the GNU General Public License as published by   *
   14  *  the Free Software Foundation; either version 2 of the License, or      *
   15  *  (at your option) any later version.                                    *
   16  *                                                                         *
   17  *  This program is distributed in the hope that it will be useful,        *
   18  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
   19  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
   20  *  GNU General Public License for more details.                           *
   21  *                                                                         *
   22  *   You should have received a copy of the GNU General Public License     *
   23  *   along with this program; if not, write to the Free Software           *
   24  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
   25  *   Boston, MA  02110-1301  USA                                           *
   26  *                                                                         *
   27  ***************************************************************************/
   28 
   29 #ifndef XML_STREAM_READER_H
   30 #define XML_STREAM_READER_H
   31 
   32 #include <QXmlStreamReader>
   33 
   34 class QString;
   35 class QStringList;
   36 
   37 class XmlStreamReader : public QXmlStreamReader {
   38 public:
   39     XmlStreamReader();
   40     explicit XmlStreamReader(QIODevice* device);
   41     explicit XmlStreamReader(const QByteArray& data);
   42     explicit XmlStreamReader(const QString& data);
   43     explicit XmlStreamReader(const char* data);
   44 
   45     const QStringList& warningStrings() const;
   46     QString missingCASWarning() const;
   47 
   48     bool hasWarnings() const;
   49     bool hasMissingCASWarnings() const;
   50 
   51     void setFailedCASMissing(bool);
   52     bool failedCASMissing() const;
   53 
   54     void raiseWarning(const QString&);
   55     void raiseMissingCASWarning(const QString&);
   56     void raiseError(const QString&);
   57 
   58     bool skipToNextTag();
   59     bool skipToEndElement();
   60     int readAttributeInt(const QString& name, bool* ok);
   61 
   62 private:
   63     QStringList m_warnings;
   64     QStringList m_missingCASPlugins;
   65     bool m_failedCASMissing{false};
   66     void init();
   67 };
   68 
   69 #endif // XML_STREAM_READER_H