1/*
2 This file is part of KDE.
3
4 SPDX-FileCopyrightText: 2009 Eckhart Wörner <ewoerner@kde.org>
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
17namespace Attica
18{
19template<class T>
20class ATTICA_EXPORT Parser
21{
22public:
23 T parse(const QString &xml);
24 typename T::List parseList(const QString &xml);
25 Metadata metadata() const;
26 virtual ~Parser();
27
28protected:
29 virtual QStringList xmlElement() const = 0;
30 virtual T parseXml(QXmlStreamReader &xml) = 0;
31
32private:
33 void parseMetadataXml(QXmlStreamReader &xml);
34 Metadata m_metadata;
35};
36
37}
38
39#endif
40

source code of attica/src/parser.h