|
SciDAVis
1.D4
|
XML stream parser that supports errors as well as warnings. More...
#include <XmlStreamReader.h>
Public Member Functions | |
| CLASS_ACCESSOR (QString, d_error_prefix, errorPrefix, ErrorPrefix) | |
| CLASS_ACCESSOR (QString, d_error_postfix, errorPostfix, ErrorPostfix) | |
| CLASS_ACCESSOR (QString, d_warning_prefix, warningPrefix, WarningPrefix) | |
| CLASS_ACCESSOR (QString, d_warning_postfix, warningPostfix, WarningPostfix) | |
| bool | hasWarnings () const |
| void | raiseError (const QString &message=QString()) |
| void | raiseWarning (const QString &message=QString()) |
| int | readAttributeInt (const QString &name, bool *ok) |
| Read an XML attribute and convert it to int. | |
| bool | skipToEndElement () |
| Go to the end element tag of the current element. | |
| bool | skipToNextTag () |
| Go to the next start or end element tag. | |
| QStringList | warningStrings () const |
| XmlStreamReader () | |
| XmlStreamReader (QIODevice *device) | |
| XmlStreamReader (const QByteArray &data) | |
| XmlStreamReader (const QString &data) | |
| XmlStreamReader (const char *data) | |
Private Member Functions | |
| void | init () |
Private Attributes | |
| QString | d_error_postfix |
| QString | d_error_prefix |
| QString | d_warning_postfix |
| QString | d_warning_prefix |
| QStringList | d_warnings |
XML stream parser that supports errors as well as warnings.
This class also adds line and column numbers to the error message.
| XmlStreamReader::XmlStreamReader | ( | ) |
References init().
| XmlStreamReader::XmlStreamReader | ( | QIODevice * | device | ) |
References init().
| XmlStreamReader::XmlStreamReader | ( | const QByteArray & | data | ) |
References init().
| XmlStreamReader::XmlStreamReader | ( | const QString & | data | ) |
References init().
| XmlStreamReader::XmlStreamReader | ( | const char * | data | ) |
References init().
| XmlStreamReader::CLASS_ACCESSOR | ( | QString | , |
| d_error_prefix | , | ||
| errorPrefix | , | ||
| ErrorPrefix | |||
| ) |
| XmlStreamReader::CLASS_ACCESSOR | ( | QString | , |
| d_error_postfix | , | ||
| errorPostfix | , | ||
| ErrorPostfix | |||
| ) |
| XmlStreamReader::CLASS_ACCESSOR | ( | QString | , |
| d_warning_prefix | , | ||
| warningPrefix | , | ||
| WarningPrefix | |||
| ) |
| XmlStreamReader::CLASS_ACCESSOR | ( | QString | , |
| d_warning_postfix | , | ||
| warningPostfix | , | ||
| WarningPostfix | |||
| ) |
| bool XmlStreamReader::hasWarnings | ( | ) | const |
References d_warnings.
Referenced by ApplicationWindow::openMatrix(), and ApplicationWindow::openTable().
|
private |
References d_error_postfix, d_error_prefix, d_warning_postfix, and d_warning_prefix.
Referenced by XmlStreamReader().
| void XmlStreamReader::raiseError | ( | const QString & | message = QString() | ) |
References d_error_postfix, and d_error_prefix.
Referenced by future::Folder::load(), Double2StringFilter::load(), Project::load(), future::Matrix::load(), future::Table::load(), AbstractSimpleFilter::load(), Column::load(), future::Matrix::readCellElement(), future::Folder::readChildAspectElement(), future::Table::readColumnWidthElement(), future::Matrix::readColumnWidthElement(), future::Matrix::readCoordinatesElement(), future::Matrix::readDisplayElement(), future::Matrix::readRowHeightElement(), skipToEndElement(), skipToNextTag(), Column::XmlReadFormula(), Column::XmlReadMask(), and Column::XmlReadRow().
| void XmlStreamReader::raiseWarning | ( | const QString & | message = QString() | ) |
| int XmlStreamReader::readAttributeInt | ( | const QString & | name, |
| bool * | ok | ||
| ) |
Read an XML attribute and convert it to int.
| name | attribute name |
| ok | pointer to report back whether the attribute value could be determined (may be NULL) |
Referenced by Project::load(), future::Matrix::load(), future::Table::load(), future::Matrix::readCellElement(), future::Table::readColumnWidthElement(), future::Matrix::readColumnWidthElement(), future::Matrix::readCoordinatesElement(), future::Matrix::readDisplayElement(), future::Matrix::readRowHeightElement(), Column::XmlReadFormula(), Column::XmlReadMask(), and Column::XmlReadRow().
| bool XmlStreamReader::skipToEndElement | ( | ) |
Go to the end element tag of the current element.
If the end of the document is reached, an error is raised.
References raiseError().
Referenced by future::Folder::load(), Project::load(), future::Matrix::load(), future::Table::load(), AbstractSimpleFilter::load(), Column::load(), future::Folder::readChildAspectElement(), future::Matrix::readCoordinatesElement(), future::Matrix::readDisplayElement(), and Column::XmlReadMask().
| bool XmlStreamReader::skipToNextTag | ( | ) |
Go to the next start or end element tag.
If the end of the document is reached, an error is raised.
References raiseError().
Referenced by Project::load(), future::Folder::readChildAspectElement(), Column::XmlReadInputFilter(), and Column::XmlReadOutputFilter().
| QStringList XmlStreamReader::warningStrings | ( | ) | const |
References d_warnings.
Referenced by ApplicationWindow::openMatrix(), and ApplicationWindow::openTable().
|
private |
Referenced by init(), and raiseError().
|
private |
Referenced by init(), and raiseError().
|
private |
Referenced by init(), and raiseWarning().
|
private |
Referenced by init(), and raiseWarning().
|
private |
Referenced by hasWarnings(), raiseWarning(), and warningStrings().
1.8.1