Akonadi

xmlparser.h
1 /*
2  SPDX-FileCopyrightText: 2017 Daniel Vr├ítil <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QXmlStreamReader>
10 
11 #include <memory>
12 
13 class Node;
14 class DocumentNode;
15 class EnumNode;
16 class ClassNode;
17 class PropertyNode;
18 
19 class XmlParser
20 {
21 public:
22  explicit XmlParser();
23  ~XmlParser();
24 
25  bool parse(const QString &filename);
26 
27  Node const *tree() const;
28 
29 private:
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 
40 private:
41  QXmlStreamReader mReader;
42  std::unique_ptr<Node> mTree;
43 };
44 
QVector< QVariant > parse(const QString &message, const QDateTime &externalIssueDateTime=QDateTime())
Definition: nodetree.h:12
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Jul 2 2022 06:41:49 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.