aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/apiextractor.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/ApiExtractor/apiextractor.h')
-rw-r--r--sources/shiboken6/ApiExtractor/apiextractor.h106
1 files changed, 40 insertions, 66 deletions
diff --git a/sources/shiboken6/ApiExtractor/apiextractor.h b/sources/shiboken6/ApiExtractor/apiextractor.h
index f7e3685f5..feae9454c 100644
--- a/sources/shiboken6/ApiExtractor/apiextractor.h
+++ b/sources/shiboken6/ApiExtractor/apiextractor.h
@@ -1,109 +1,83 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of Qt for Python.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#ifndef APIEXTRACTOR_H
#define APIEXTRACTOR_H
#include "abstractmetalang_typedefs.h"
+#include "apiextractorflags.h"
#include "header_paths.h"
-#include "typedatabase_typedefs.h"
-#include "typesystem_typedefs.h"
#include "clangparser/compilersupport.h"
-#include <QFileInfoList>
-#include <QStringList>
+#include "typesystem_typedefs.h"
+
+#include <QtCore/QFileInfoList>
+#include <QtCore/QStringList>
#include <optional>
class ApiExtractorResult;
-class AbstractMetaBuilder;
class AbstractMetaClass;
class AbstractMetaEnum;
class AbstractMetaFunction;
-class AbstractMetaType;
-class ContainerTypeEntry;
-class EnumTypeEntry;
-class FlagsTypeEntry;
-class PrimitiveTypeEntry;
-class TypeEntry;
+class ComplexTypeEntry;
+struct OptionDescription;
+class OptionsParser;
QT_BEGIN_NAMESPACE
class QDebug;
class QIODevice;
QT_END_NAMESPACE
+struct ApiExtractorPrivate;
+
class ApiExtractor
{
public:
- Q_DISABLE_COPY(ApiExtractor)
+ Q_DISABLE_COPY_MOVE(ApiExtractor)
ApiExtractor();
~ApiExtractor();
+ static QList<OptionDescription> options();
+ std::shared_ptr<OptionsParser> createOptionsParser();
+
void setTypeSystem(const QString& typeSystemFileName);
- QString typeSystem() const { return m_typeSystemFileName; }
+ QString typeSystem() const;
void setCppFileNames(const QFileInfoList &cppFileNames);
- QFileInfoList cppFileNames() const { return m_cppFileNames; }
- void setSkipDeprecated(bool value);
- static void setSuppressWarnings(bool value);
- static void setSilent(bool value);
- static void addTypesystemSearchPath(const QString &path);
- static void addTypesystemSearchPath(const QStringList& paths);
- static void setTypesystemKeywords(const QStringList& keywords);
- void addIncludePath(const HeaderPath& path);
- void addIncludePath(const HeaderPaths& paths);
- HeaderPaths includePaths() const { return m_includePaths; }
+ QFileInfoList cppFileNames() const;
+ HeaderPaths includePaths() const;
void setLogDirectory(const QString& logDir);
- static bool setApiVersion(const QString &package, const QString &version);
- static void setDropTypeEntries(const QStringList &dropEntries);
LanguageLevel languageLevel() const;
- void setLanguageLevel(LanguageLevel languageLevel);
QStringList clangOptions() const;
- void setClangOptions(const QStringList &co);
- static void setUseGlobalHeader(bool h);
const AbstractMetaEnumList &globalEnums() const;
const AbstractMetaFunctionCList &globalFunctions() const;
const AbstractMetaClassList &classes() const;
const AbstractMetaClassList &smartPointers() const;
- std::optional<ApiExtractorResult> run(bool usePySideExtensions);
+ std::optional<ApiExtractorResult> run(ApiExtractorFlags flags);
+
+ /// Forwards to AbstractMetaBuilder::inheritTemplateFunction()
+ static AbstractMetaFunctionPtr
+ inheritTemplateFunction(const AbstractMetaFunctionCPtr &function,
+ const AbstractMetaTypeList &templateTypes);
+
+ /// Forwards to AbstractMetaBuilder::inheritTemplateMember()
+ static AbstractMetaFunctionPtr
+ inheritTemplateMember(const AbstractMetaFunctionCPtr &function,
+ const AbstractMetaTypeList &templateTypes,
+ const AbstractMetaClassCPtr &templateClass,
+ const AbstractMetaClassPtr &subclass);
+
+ /// Forwards to AbstractMetaBuilder::inheritTemplateClass()
+ static AbstractMetaClassPtr
+ inheritTemplateClass(const ComplexTypeEntryPtr &te,
+ const AbstractMetaClassCPtr &templateClass,
+ const AbstractMetaTypeList &templateTypes,
+ InheritTemplateFlags flags = {});
private:
- bool runHelper(bool usePySideExtensions);
-
- QString m_typeSystemFileName;
- QFileInfoList m_cppFileNames;
- HeaderPaths m_includePaths;
- QStringList m_clangOptions;
- AbstractMetaBuilder* m_builder = nullptr;
- QString m_logDirectory;
- LanguageLevel m_languageLevel = LanguageLevel::Default;
- bool m_skipDeprecated = false;
+ ApiExtractorPrivate *d;
#ifndef QT_NO_DEBUG_STREAM
friend QDebug operator<<(QDebug d, const ApiExtractor &ae);