aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/typedatabase.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typedatabase.h')
-rw-r--r--sources/shiboken2/ApiExtractor/typedatabase.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/sources/shiboken2/ApiExtractor/typedatabase.h b/sources/shiboken2/ApiExtractor/typedatabase.h
index 4255cf458..603a43ba4 100644
--- a/sources/shiboken2/ApiExtractor/typedatabase.h
+++ b/sources/shiboken2/ApiExtractor/typedatabase.h
@@ -31,9 +31,11 @@
#include "apiextractormacros.h"
#include "include.h"
+#include "typedatabase_typedefs.h"
#include "typesystem_enums.h"
#include "typesystem_typedefs.h"
+#include <QtCore/QRegularExpression>
#include <QtCore/QStringList>
QT_FORWARD_DECLARE_CLASS(QIODevice)
@@ -95,16 +97,22 @@ public:
SingleTypeEntryHash entries() const;
- QList<const PrimitiveTypeEntry*> primitiveTypes() const;
+ PrimitiveTypeEntryList primitiveTypes() const;
- QList<const ContainerTypeEntry*> containerTypes() const;
+ ContainerTypeEntryList containerTypes() const;
- void addRejection(const QString& className, const QString& functionName,
- const QString& fieldName, const QString& enumName);
- bool isClassRejected(const QString& className) const;
- bool isFunctionRejected(const QString& className, const QString& functionName) const;
- bool isFieldRejected(const QString& className, const QString& fieldName) const;
- bool isEnumRejected(const QString& className, const QString& enumName) const;
+ void addRejection(const TypeRejection &);
+ bool isClassRejected(const QString& className, QString *reason = nullptr) const;
+ bool isFunctionRejected(const QString& className, const QString& functionName,
+ QString *reason = nullptr) const;
+ bool isFieldRejected(const QString& className, const QString& fieldName,
+ QString *reason = nullptr) const;
+ bool isEnumRejected(const QString& className, const QString& enumName,
+ QString *reason = nullptr) const;
+ bool isArgumentTypeRejected(const QString& className, const QString& typeName,
+ QString *reason = nullptr) const;
+ bool isReturnTypeRejected(const QString& className, const QString& typeName,
+ QString *reason = nullptr) const;
void addType(TypeEntry* e);
@@ -127,7 +135,7 @@ public:
void setSuppressWarnings(bool on) { m_suppressWarnings = on; }
- void addSuppressedWarning(const QString &s);
+ bool addSuppressedWarning(const QString &warning, QString *errorMessage);
bool isSuppressedWarning(const QString& s) const;
@@ -150,14 +158,14 @@ public:
void formatDebug(QDebug &d) const;
#endif
private:
- QList<TypeEntry *> findTypes(const QString &name) const;
+ TypeEntryList findTypes(const QString &name) const;
QString modifiedTypesystemFilepath(const QString &tsFile) const;
bool m_suppressWarnings;
TypeEntryHash m_entries;
SingleTypeEntryHash m_flagsEntries;
TemplateEntryHash m_templates;
- QStringList m_suppressedWarnings;
+ QVector<QRegularExpression> m_suppressedWarnings;
AddedFunctionList m_globalUserFunctions;
FunctionModificationList m_functionMods;
@@ -167,7 +175,7 @@ private:
QStringList m_typesystemPaths;
QHash<QString, bool> m_parsedTypesystemFiles;
- QList<TypeRejection> m_rejections;
+ QVector<TypeRejection> m_rejections;
QStringList m_dropTypeEntries;
};