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
12QT_BEGIN_NAMESPACE
13
14struct QmltcCodeWriter
15{
16 static void writeGlobalHeader(QmltcOutputWrapper &code, const QString &sourcePath,
17 const QString &hPath, const QString &cppPath,
18 const QString &outNamespace,
19 const QSet<QString> &requiredCppIncludes);
20 static void writeGlobalFooter(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
31private:
32 static void writeUrl(QmltcOutputWrapper &code, const QmltcMethod &urlMethod); // special
33};
34
35QT_END_NAMESPACE
36
37#endif // QMLTCCODEWRITER_H
38

source code of qtdeclarative/tools/qmltc/qmltccodewriter.h