Akonadi

xmlparser.h
1/*
2 SPDX-FileCopyrightText: 2017 Daniel Vrátil <dvratil@kde.og>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <QXmlStreamReader>
10
11#include <memory>
12
13class Node;
14class DocumentNode;
15class EnumNode;
16class ClassNode;
17class PropertyNode;
18
19class XmlParser
20{
21public:
22 explicit XmlParser();
23 ~XmlParser();
24
25 bool parse(const QString &filename);
26
27 Node const *tree() const;
28
29private:
30 bool parseProtocol();
31 bool parseCommand(DocumentNode *parent);
32 bool parseEnum(ClassNode *parent);
33 bool parseEnumValue(EnumNode *parent);
34 bool parseParam(ClassNode *parent);
35 bool parseCtor(ClassNode *parent);
36 bool parseSetter(PropertyNode *parent);
37
38 void printError(const QString &error);
39
40private:
41 QXmlStreamReader mReader;
42 std::unique_ptr<Node> mTree;
43};
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.