Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmltccodewriter_p.h
Go to the documentation of this file.
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// Qt-Security score:significant
4
5#ifndef QQMLTCCODEWRITER_P_H
6#define QQMLTCCODEWRITER_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qqmltcoutputprimitives_p.h>
20#include <private/qqmltcoutputir_p.h>
21
22#include <QtCore/qstring.h>
23
24QT_BEGIN_NAMESPACE
25
26namespace QQmltc {
27
29{
30 static void writeGlobalHeader(OutputWrapper &code, const QString &sourcePath,
31 const QString &hPath, const QString &cppPath,
32 const QString &outNamespace,
33 const QSet<QString> &requiredCppIncludes);
34 static void writeGlobalFooter(OutputWrapper &code, const QString &sourcePath,
35 const QString &outNamespace);
36 static void write(OutputWrapper &code, const Program &program);
37 static void write(OutputWrapper &code, const Type &type, const QString &exportMacro);
38 static void write(OutputWrapper &code, const Enum &enumeration);
39 static void write(OutputWrapper &code, const Method &method);
40 static void write(OutputWrapper &code, const Ctor &ctor);
41 static void write(OutputWrapper &code, const Dtor &dtor);
42 static void write(OutputWrapper &code, const Variable &var);
43 static void write(OutputWrapper &code, const Property &prop);
44 static void write(OutputWrapper &code, const PropertyInitializer &propertyInitializer, const Type& wrappedType);
45 static void write(OutputWrapper &code, const RequiredPropertiesBundle &requiredPropertiesBundle);
46
47private:
48 static void writeUrl(OutputWrapper &code, const Method &urlMethod); // special
49};
50
51} // namespace QQmltc
52
53QT_END_NAMESPACE
54
55#endif // QQMLTCCODEWRITER_P_H
static void writeSpecialMethod(OutputWrapper &code, const MethodBase &specialMethod, WriteInitialization writeInit)
static QString appendSpace(const QString &s)
static QString getFunctionCategory(const MethodBase &method)
static QString prependSpace(const QString &s)
static void dumpFunctions(OutputWrapper &code, const QList< Method > &functions, Predicate pred)
static QString functionReturnType(const Method &m)
static std::pair< QString, QString > functionSignatures(const MethodBase &method)
static void writeToFile(const QString &path, const QByteArray &data)
static QString urlToMacro(const QString &url)
static void write(OutputWrapper &code, const Type &type, const QString &exportMacro)
static void write(OutputWrapper &code, const Program &program)
static void writeGlobalHeader(OutputWrapper &code, const QString &sourcePath, const QString &hPath, const QString &cppPath, const QString &outNamespace, const QSet< QString > &requiredCppIncludes)
static void writeGlobalFooter(OutputWrapper &code, const QString &sourcePath, const QString &outNamespace)