1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLIRLOADER_P_H
5#define QQMLIRLOADER_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <private/qtqmlglobal_p.h>
19#include <private/qv4compileddata_p.h>
20#include <private/qqmljsmemorypool_p.h>
21
22QT_BEGIN_NAMESPACE
23
24namespace QmlIR {
25struct Document;
26struct Object;
27}
28
29struct Q_QML_PRIVATE_EXPORT QQmlIRLoader {
30 QQmlIRLoader(const QV4::CompiledData::Unit *unit, QmlIR::Document *output);
31
32 void load();
33
34private:
35 QmlIR::Object *loadObject(const QV4::CompiledData::Object *serializedObject);
36
37 template <typename _Tp> _Tp *New() { return pool->New<_Tp>(); }
38
39 const QV4::CompiledData::Unit *unit;
40 QmlIR::Document *output;
41 QQmlJS::MemoryPool *pool;
42};
43
44QT_END_NAMESPACE
45
46#endif // QQMLIRLOADER_P_H
47

source code of qtdeclarative/src/qml/qml/qqmlirloader_p.h