|
Cppcheck
|
00001 /* 00002 * Cppcheck - A tool for static C/C++ code analysis 00003 * Copyright (C) 2007-2013 Daniel Marjamäki and Cppcheck team. 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation, either version 3 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 #ifndef XML_REPORT_H 00020 #define XML_REPORT_H 00021 00022 #include <QString> 00023 #include <QList> 00024 #include "report.h" 00025 #include "erroritem.h" 00026 00027 class QObject; 00028 00029 /// @addtogroup GUI 00030 /// @{ 00031 00032 00033 /** 00034 * @brief Base class for XML report classes. 00035 */ 00036 class XmlReport : public Report { 00037 public: 00038 XmlReport(const QString &filename); 00039 00040 /** 00041 * @brief Read contents of the report file. 00042 */ 00043 virtual QList<ErrorItem> Read() = 0; 00044 00045 /** 00046 * @brief Quote the message. 00047 * @param message Message to quote. 00048 * @return quoted message. 00049 */ 00050 static QString quoteMessage(const QString &message); 00051 00052 /** 00053 * @brief Unquote the message. 00054 * @param message Message to quote. 00055 * @return quoted message. 00056 */ 00057 static QString unquoteMessage(const QString &message); 00058 00059 /** 00060 * @brief Get the XML report format version from the file. 00061 * @param filename Filename of the report file. 00062 * @return XML report format version or 0 if error happened. 00063 */ 00064 static int determineVersion(const QString &filename); 00065 }; 00066 /// @} 00067 00068 #endif // XML_REPORT_H
1.7.6.1