1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
3 | |
4 | #ifndef QMLTCCODEWRITER_H |
5 | #define QMLTCCODEWRITER_H |
6 | |
7 | #include "qmltcoutputprimitives.h" |
8 | #include "qmltcoutputir.h" |
9 | |
10 | #include <QtCore/qstring.h> |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | struct QmltcCodeWriter |
15 | { |
16 | static void (QmltcOutputWrapper &code, const QString &sourcePath, |
17 | const QString &hPath, const QString &cppPath, |
18 | const QString &outNamespace, |
19 | const QSet<QString> &requiredCppIncludes); |
20 | static void (QmltcOutputWrapper &code, const QString &sourcePath, |
21 | const QString &outNamespace); |
22 | static void write(QmltcOutputWrapper &code, const QmltcProgram &program); |
23 | static void write(QmltcOutputWrapper &code, const QmltcType &type, const QString &exportMacro); |
24 | static void write(QmltcOutputWrapper &code, const QmltcEnum &enumeration); |
25 | static void write(QmltcOutputWrapper &code, const QmltcMethod &method); |
26 | static void write(QmltcOutputWrapper &code, const QmltcCtor &ctor); |
27 | static void write(QmltcOutputWrapper &code, const QmltcDtor &dtor); |
28 | static void write(QmltcOutputWrapper &code, const QmltcVariable &var); |
29 | static void write(QmltcOutputWrapper &code, const QmltcProperty &prop); |
30 | static void write(QmltcOutputWrapper &code, const QmltcPropertyInitializer &propertyInitializer, const QmltcType& wrappedType); |
31 | static void write(QmltcOutputWrapper &code, const QmltcRequiredPropertiesBundle &requiredPropertiesBundle); |
32 | |
33 | private: |
34 | static void writeUrl(QmltcOutputWrapper &code, const QmltcMethod &urlMethod); // special |
35 | }; |
36 | |
37 | QT_END_NAMESPACE |
38 | |
39 | #endif // QMLTCCODEWRITER_H |
40 | |