KConfig

KConfigHeaderGenerator.h
1 /*
2  This file is part of KDE.
3 
4  SPDX-FileCopyrightText: 2003 Cornelius Schumacher <[email protected]>
5  SPDX-FileCopyrightText: 2003 Waldo Bastian <[email protected]>
6  SPDX-FileCopyrightText: 2003 Zack Rusin <[email protected]>
7  SPDX-FileCopyrightText: 2006 MichaĆ«l Larouche <[email protected]>
8  SPDX-FileCopyrightText: 2008 Allen Winter <[email protected]>
9  SPDX-FileCopyrightText: 2020 Tomaz Cananbrava <[email protected]>
10 
11  SPDX-License-Identifier: LGPL-2.0-or-later
12 */
13 
14 #ifndef KCONFIGHEADERGENERATOR_H
15 #define KCONFIGHEADERGENERATOR_H
16 
17 #include "KConfigCodeGeneratorBase.h"
18 #include "KConfigCommonStructs.h"
19 
20 #include <QString>
21 #include <QList>
22 
23 class KConfigParameters;
24 class CfgEntry;
25 class QTextStream;
26 struct ParseResult;
27 
28 class KConfigHeaderGenerator : public KConfigCodeGeneratorBase {
29 public:
30  KConfigHeaderGenerator(
31  const QString &inputFile,
32  const QString &baseDir,
33  const KConfigParameters &parameters,
34  ParseResult &parseResult);
35 
36  void start() override;
37 
38 private:
39  void startHeaderGuards();
40  void endHeaderGuards();
41 
42  void implementEnums();
43  void implementChoiceEnums(const CfgEntry *entry, const CfgEntry::Choices &choices);
44  void implementValueEnums(const CfgEntry *entry, const QStringList &values);
45 
46  void doClassDefinition();
47  void createHeaders();
48  void createDPointer();
49  void createNonDPointerHelpers();
50 
51  void createConstructor();
52  void createDestructor();
53  void createForwardDeclarations();
54  void createSingleton();
55  void createSignals();
56 
57  void createSetters(const CfgEntry *entry);
58  void createItemAcessors(const CfgEntry *entry, const QString &returnType);
59  void createGetters(const CfgEntry *entry, const QString &returnType);
60  void createImmutableGetters(const CfgEntry *entry);
61  void createProperties(const CfgEntry *entry, const QString &returnType);
62  void createImmutableProperty(const CfgEntry *entry);
63  void createDefaultValueMember(const CfgEntry *entry);
64 };
65 
66 #endif
Configuration Compiler Configuration.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 11 2020 22:47:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.