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 template<class T>
20 class ATTICA_EXPORT Parser
21 {
22 public:
23  T parse(const QString &xml);
24  typename T::List parseList(const QString &xml);
25  Metadata metadata() const;
26  virtual ~Parser();
27 
28 protected:
29  virtual QStringList xmlElement() const = 0;
30  virtual T parseXml(QXmlStreamReader &xml) = 0;
31 
32 private:
33  void parseMetadataXml(QXmlStreamReader &xml);
34  Metadata m_metadata;
35 };
36 
37 }
38 
39 #endif
KHEALTHCERTIFICATE_EXPORT QVariant parse(const QByteArray &data)
The Attica namespace,.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 04:05:13 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.