scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

XmlStreamReader.h
Go to the documentation of this file.
1 
11 
29 #ifndef XML_STREAM_READER_H
30 #define XML_STREAM_READER_H
31 
32 #include <QXmlStreamReader>
33 #include <QString>
34 #include <QStringList>
35 #include "lib/macros.h"
36 
38 
41 class XmlStreamReader : public QXmlStreamReader
42 {
43  public:
45  XmlStreamReader(QIODevice * device);
46  XmlStreamReader(const QByteArray & data);
47  XmlStreamReader(const QString & data);
48  XmlStreamReader(const char * data);
49 
50  QStringList warningStrings() const;
51  bool hasWarnings() const;
52  void raiseWarning(const QString & message = QString());
53  void raiseError(const QString & message = QString());
54  CLASS_ACCESSOR(QString, d_error_prefix, errorPrefix, ErrorPrefix);
55  CLASS_ACCESSOR(QString, d_error_postfix, errorPostfix, ErrorPostfix);
56  CLASS_ACCESSOR(QString, d_warning_prefix, warningPrefix, WarningPrefix);
57  CLASS_ACCESSOR(QString, d_warning_postfix, warningPostfix, WarningPostfix);
58 
60 
65  bool skipToNextTag();
67 
72  bool skipToEndElement();
73 
75 
80  int readAttributeInt(const QString & name, bool * ok);
81 
82  private:
83  QStringList d_warnings;
84  QString d_error_prefix;
85  QString d_error_postfix;
88 
89  void init();
90 };
91 
92 #endif // XML_STREAM_READER_H
XmlStreamReader::d_warnings
QStringList d_warnings
Definition: XmlStreamReader.h:83
XmlStreamReader::skipToNextTag
bool skipToNextTag()
Go to the next start or end element tag.
Definition: XmlStreamReader.cpp:92
XmlStreamReader::CLASS_ACCESSOR
CLASS_ACCESSOR(QString, d_error_postfix, errorPostfix, ErrorPostfix)
XmlStreamReader::raiseError
void raiseError(const QString &message=QString())
Definition: XmlStreamReader.cpp:80
data
Definition: exp_saturation.c:37
XmlStreamReader::readAttributeInt
int readAttributeInt(const QString &name, bool *ok)
Read an XML attribute and convert it to int.
Definition: XmlStreamReader.cpp:110
XmlStreamReader
XML stream parser that supports errors as well as warnings.
Definition: XmlStreamReader.h:42
macros.h
XmlStreamReader::hasWarnings
bool hasWarnings() const
Definition: XmlStreamReader.cpp:75
XmlStreamReader::CLASS_ACCESSOR
CLASS_ACCESSOR(QString, d_error_prefix, errorPrefix, ErrorPrefix)
XmlStreamReader::d_warning_postfix
QString d_warning_postfix
Definition: XmlStreamReader.h:87
XmlStreamReader::skipToEndElement
bool skipToEndElement()
Go to the end element tag of the current element.
Definition: XmlStreamReader.cpp:121
XmlStreamReader::d_error_postfix
QString d_error_postfix
Definition: XmlStreamReader.h:85
XmlStreamReader::init
void init()
Definition: XmlStreamReader.cpp:62
XmlStreamReader::warningStrings
QStringList warningStrings() const
Definition: XmlStreamReader.cpp:70
XmlStreamReader::XmlStreamReader
XmlStreamReader()
Definition: XmlStreamReader.cpp:33
name
char * name()
Definition: exp_saturation.c:45
XmlStreamReader::d_error_prefix
QString d_error_prefix
Definition: XmlStreamReader.h:84
XmlStreamReader::d_warning_prefix
QString d_warning_prefix
Definition: XmlStreamReader.h:86
XmlStreamReader::CLASS_ACCESSOR
CLASS_ACCESSOR(QString, d_warning_postfix, warningPostfix, WarningPostfix)
XmlStreamReader::raiseWarning
void raiseWarning(const QString &message=QString())
Definition: XmlStreamReader.cpp:86
XmlStreamReader::CLASS_ACCESSOR
CLASS_ACCESSOR(QString, d_warning_prefix, warningPrefix, WarningPrefix)