Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmltypesclassdescription_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 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 QMLTYPESCLASSDESCRIPTION_P_H
5#define QMLTYPESCLASSDESCRIPTION_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/qmetatypesjsonprocessor_p.h>
19
20#include <QtCore/qstring.h>
21#include <QtCore/qcbormap.h>
22#include <QtCore/qvector.h>
23#include <QtCore/qset.h>
24#include <QtCore/qversionnumber.h>
25
27
29{
35
36 FoundType() = default;
37 FoundType(const MetaType &single, Origin origin);
38
41
44
45 operator bool() const { return !native.isEmpty() || !javaScript.isEmpty(); }
46
47 MetaType select(const MetaType &category, QAnyStringView relation) const;
48
49};
50
52{
53 // All the string views in this class are based on string data in the JSON they are parsed from.
54 // You must keep the relevant QCborValues alive while the QmlTypesClassDescription exists.
55
59 QList<QAnyStringView> primitiveAliases;
60 QList<QAnyStringView> elementNames;
69 QList<QTypeRevision> revisions;
72 bool isCreatable = true;
73 bool isStructured = false;
74 bool isSingleton = false;
75 bool hasCustomParser = false;
76 bool isRootClass = false;
80 QList<QAnyStringView> implementsInterfaces;
81 QList<QAnyStringView> deferredNames;
82 QList<QAnyStringView> immediateNames;
83
89
90 void collect(
91 const MetaType &classDef, const QVector<MetaType> &types,
92 const QVector<MetaType> &foreign, CollectMode mode, QTypeRevision defaultRevision);
94 QAnyStringView related, const QVector<MetaType> &types,
95 const QVector<MetaType> &foreign, QTypeRevision defaultRevision,
96 const QList<QAnyStringView> &namespaces);
97
98 static FoundType findType(
99 const QVector<MetaType> &types, const QVector<MetaType> &foreign,
100 const QAnyStringView &name, const QList<QAnyStringView> &namespaces);
101
103 const MetaType &classDef, const QVector<MetaType> &types,
104 const QVector<MetaType> &foreign, QTypeRevision defaultRevision);
105
106
107private:
108 void collectSuperClasses(
109 const MetaType &classDef, const QVector<MetaType> &types,
110 const QVector<MetaType> &foreign, CollectMode mode, QTypeRevision defaultRevision);
111 void collectInterfaces(const MetaType &classDef);
112};
113
115{
117
119 bool isList = false;
120 bool isPointer = false;
121 bool isConstant = false;
122};
123
125#endif // QMLTYPESCLASSDESCRIPTION_P_H
\inmodule QtCore
\inmodule QtCore
const QLoggingCategory & category()
[1]
Combined button and popup list for selecting options.
GLenum mode
GLsizei GLenum GLenum * types
GLuint name
MetaType select(const MetaType &category, QAnyStringView relation) const
FoundType()=default
QList< QAnyStringView > implementsInterfaces
QList< QAnyStringView > primitiveAliases
void collect(const MetaType &classDef, const QVector< MetaType > &types, const QVector< MetaType > &foreign, CollectMode mode, QTypeRevision defaultRevision)
QList< QAnyStringView > immediateNames
FoundType collectRelated(QAnyStringView related, const QVector< MetaType > &types, const QVector< MetaType > &foreign, QTypeRevision defaultRevision, const QList< QAnyStringView > &namespaces)
static FoundType findType(const QVector< MetaType > &types, const QVector< MetaType > &foreign, const QAnyStringView &name, const QList< QAnyStringView > &namespaces)
QList< QAnyStringView > elementNames
QList< QAnyStringView > deferredNames
void collectLocalAnonymous(const MetaType &classDef, const QVector< MetaType > &types, const QVector< MetaType > &foreign, QTypeRevision defaultRevision)
ResolvedTypeAlias(QAnyStringView alias)