4#ifndef METATYPESJSONPROCESSOR_P_H
5#define METATYPESJSONPROCESSOR_P_H
18#include <QtCore/qcbormap.h>
19#include <QtCore/qstring.h>
20#include <QtCore/qtyperevision.h>
21#include <QtCore/qvarlengtharray.h>
22#include <QtCore/qvector.h>
31enum class Access { Public, Protected, Private };
110 Method(
const QCborMap &cbor,
bool isConstructor);
133 Enum(
const QCborMap &cbor);
181 MetaType(
const QCborMap &cbor,
const QString &inputFile);
183 bool isEmpty()
const {
return d == &s_empty; }
221 bool isValid()
const {
return !alias.isEmpty() && !original.isEmpty(); }
225 return std::tie(a.alias, a.original) == std::tie(b.alias, b.original);
231 return a.alias != b.alias
232 ? compareThreeWay(a.alias, b.alias)
233 : compareThreeWay(a.original, b.original);
262 enum RegistrationMode {
266 NamespaceRegistration
269 struct PreProcessResult {
270 QList<QAnyStringView> primitiveAliases;
272 QAnyStringView foreignPrimitive;
273 RegistrationMode mode;
276 enum class PopulateMode { No, Yes };
277 static PreProcessResult preProcess(
const MetaType &classDef, PopulateMode populateMode);
278 void addRelatedTypes();
280 void sortTypes(QVector<MetaType> &types);
281 QString resolvedInclude(QAnyStringView include);
285 bool isPrimitive(QAnyStringView type)
const
287 return std::binary_search(m_primitiveTypes.begin(), m_primitiveTypes.end(), type);
290 QList<QString> m_includes;
291 QList<QAnyStringView> m_referencedTypes;
292 QList<QAnyStringView> m_primitiveTypes;
293 QList<UsingDeclaration> m_usingDeclarations;
294 QVector<MetaType> m_types;
295 QVector<MetaType> m_foreignTypes;
296 bool m_privateIncludes =
false;
Combined button and popup list for selecting options.
QDebug warning(const MetaType &classDef)
Argument(const QCborMap &cbor)
BaseType(const QCborMap &cbor)
ClassInfo(const QCborMap &cbor)
QList< QAnyStringView > values
Enum(const QCborMap &cbor)
Interface(const QCborValue &cbor)
QAnyStringView returnType
Argument::Container arguments
bool isJavaScriptFunction
Method(const QCborMap &cbor, bool isConstructor)
static constexpr int InvalidIndex
QAnyStringView privateClass
Property(const QCborMap &cbor)
friend bool comparesEqual(const UsingDeclaration &a, const UsingDeclaration &b) noexcept
friend Qt::strong_ordering compareThreeWay(const UsingDeclaration &a, const UsingDeclaration &b) noexcept