aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/typesystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typesystem.h')
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/typesystem.h b/sources/shiboken2/ApiExtractor/typesystem.h
index 51a8ec937..26f94e3ee 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.h
+++ b/sources/shiboken2/ApiExtractor/typesystem.h
@@ -545,7 +545,8 @@ public:
CustomType,
TargetLangType,
FunctionType,
- SmartPointerType
+ SmartPointerType,
+ TypedefType
};
Q_ENUM(Type)
@@ -873,6 +874,8 @@ public:
virtual TypeEntry *clone() const;
+ void useAsTypedef(const TypeEntry *source);
+
#ifndef QT_NO_DEBUG_STREAM
virtual void formatDebug(QDebug &d) const;
#endif
@@ -1366,6 +1369,8 @@ public:
TypeEntry *clone() const override;
+ void useAsTypedef(const ComplexTypeEntry *source);
+
#ifndef QT_NO_DEBUG_STREAM
void formatDebug(QDebug &d) const override;
#endif
@@ -1395,6 +1400,36 @@ private:
const ComplexTypeEntry* m_baseContainerType = nullptr;
};
+class TypedefEntry : public ComplexTypeEntry
+{
+public:
+ explicit TypedefEntry(const QString &name,
+ const QString &sourceType,
+ const QVersionNumber &vr);
+
+ QString sourceType() const { return m_sourceType; }
+ void setSourceType(const QString &s) { m_sourceType =s; }
+
+ TypeEntry *clone() const override;
+
+ ComplexTypeEntry *source() const { return m_source; }
+ void setSource(ComplexTypeEntry *source) { m_source = source; }
+
+ ComplexTypeEntry *target() const { return m_target; }
+ void setTarget(ComplexTypeEntry *target) { m_target = target; }
+
+#ifndef QT_NO_DEBUG_STREAM
+ virtual void formatDebug(QDebug &d) const override;
+#endif
+protected:
+ TypedefEntry(const TypedefEntry &);
+
+private:
+ QString m_sourceType;
+ ComplexTypeEntry *m_source;
+ ComplexTypeEntry *m_target;
+};
+
class ContainerTypeEntry : public ComplexTypeEntry
{
Q_GADGET