diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/apiextractorresult.cpp')
-rw-r--r-- | sources/shiboken6/ApiExtractor/apiextractorresult.cpp | 96 |
1 files changed, 65 insertions, 31 deletions
diff --git a/sources/shiboken6/ApiExtractor/apiextractorresult.cpp b/sources/shiboken6/ApiExtractor/apiextractorresult.cpp index 04566ada2..2a48a30d1 100644 --- a/sources/shiboken6/ApiExtractor/apiextractorresult.cpp +++ b/sources/shiboken6/ApiExtractor/apiextractorresult.cpp @@ -1,48 +1,82 @@ -/**************************************************************************** -** -** Copyright (C) 2020 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) 2020 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 #include "apiextractorresult.h" #include "abstractmetalang.h" #include "abstractmetaenum.h" -#include "typesystem.h" +#include "enumtypeentry.h" +#include "flagstypeentry.h" -std::optional<AbstractMetaEnum> ApiExtractorResult::findAbstractMetaEnum(const TypeEntry *typeEntry) const +ApiExtractorResult::ApiExtractorResult() = default; + +ApiExtractorResult::ApiExtractorResult(const ApiExtractorResult &) = default; + +ApiExtractorResult &ApiExtractorResult::operator=(const ApiExtractorResult &) = default; + +ApiExtractorResult::ApiExtractorResult(ApiExtractorResult &&) noexcept = default; + +ApiExtractorResult &ApiExtractorResult::operator=(ApiExtractorResult &&) noexcept = default; + +ApiExtractorResult::~ApiExtractorResult() = default; + +const AbstractMetaEnumList &ApiExtractorResult::globalEnums() const +{ + return m_globalEnums; +} + +const AbstractMetaFunctionCList &ApiExtractorResult::globalFunctions() const +{ + return m_globalFunctions; +} + +const AbstractMetaClassCList &ApiExtractorResult::classes() const +{ + return m_metaClasses; +} + +const AbstractMetaClassCList &ApiExtractorResult::smartPointers() const +{ + return m_smartPointers; +} + +const AbstractMetaTypeList &ApiExtractorResult::instantiatedContainers() const +{ + return m_instantiatedContainers; +} + +const InstantiatedSmartPointers &ApiExtractorResult::instantiatedSmartPointers() const +{ + return m_instantiatedSmartPointers; +} + +const QMultiHash<QString, QString> &ApiExtractorResult::typedefTargetToName() const +{ + return m_typedefTargetToName; +} + +ApiExtractorFlags ApiExtractorResult::flags() const +{ + return m_flags; +} + +void ApiExtractorResult::setFlags(ApiExtractorFlags f) +{ + m_flags = f; +} + +std::optional<AbstractMetaEnum> + ApiExtractorResult::findAbstractMetaEnum(TypeEntryCPtr typeEntry) const { if (typeEntry && typeEntry->isFlags()) - typeEntry = static_cast<const FlagsTypeEntry *>(typeEntry)->originator(); + typeEntry = std::static_pointer_cast<const FlagsTypeEntry>(typeEntry)->originator(); const auto it = m_enums.constFind(typeEntry); if (it == m_enums.constEnd()) return {}; return it.value(); } -AbstractMetaFunctionCList ApiExtractorResult::implicitConversions(const TypeEntry *type) const +AbstractMetaFunctionCList ApiExtractorResult::implicitConversions(const TypeEntryCPtr &type) const { if (type->isValue()) { if (auto metaClass = AbstractMetaClass::findClass(m_metaClasses, type)) |