Attica

parser.h
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2009 Eckhart W├Ârner <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7 */
8 
9 #ifndef ATTICA_PARSER_H
10 #define ATTICA_PARSER_H
11 
12 #include <QStringList>
13 #include <QXmlStreamReader>
14 
15 #include "listjob.h"
16 
17 namespace Attica
18 {
19 
20 template <class T>
21 class ATTICA_EXPORT Parser
22 {
23 public:
24  T parse(const QString &xml);
25  typename T::List parseList(const QString &xml);
26  Metadata metadata() const;
27  virtual ~Parser();
28 
29 protected:
30  virtual QStringList xmlElement() const = 0;
31  virtual T parseXml(QXmlStreamReader &xml) = 0;
32 
33 private:
34  void parseMetadataXml(QXmlStreamReader &xml);
35  Metadata m_metadata;
36 };
37 
38 }
39 
40 #endif
QVector< QVariant > parse(const QString &message, const QDate &externalIssueDate=QDate())
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 23:06:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.