aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/typesystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/typesystem.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/typesystem.cpp126
1 files changed, 126 insertions, 0 deletions
diff --git a/sources/shiboken2/ApiExtractor/typesystem.cpp b/sources/shiboken2/ApiExtractor/typesystem.cpp
index d08fed7f9..586a20cd9 100644
--- a/sources/shiboken2/ApiExtractor/typesystem.cpp
+++ b/sources/shiboken2/ApiExtractor/typesystem.cpp
@@ -2723,6 +2723,13 @@ PrimitiveTypeEntry *PrimitiveTypeEntry::basicReferencedTypeEntry() const
return baseReferencedTypeEntry ? baseReferencedTypeEntry : m_referencedTypeEntry;
}
+TypeEntry *PrimitiveTypeEntry::clone() const
+{
+ return new PrimitiveTypeEntry(*this);
+}
+
+PrimitiveTypeEntry::PrimitiveTypeEntry(const PrimitiveTypeEntry &) = default;
+
CodeSnipList TypeEntry::codeSnips() const
{
return m_codeSnips;
@@ -2778,6 +2785,13 @@ bool ComplexTypeEntry::hasDefaultConstructor() const
return !m_defaultConstructor.isEmpty();
}
+TypeEntry *ComplexTypeEntry::clone() const
+{
+ return new ComplexTypeEntry(*this);
+}
+
+ComplexTypeEntry::ComplexTypeEntry(const ComplexTypeEntry &) = default;
+
QString ContainerTypeEntry::targetLangName() const
{
@@ -2808,6 +2822,13 @@ QString ContainerTypeEntry::qualifiedCppName() const
return ComplexTypeEntry::qualifiedCppName();
}
+TypeEntry *ContainerTypeEntry::clone() const
+{
+ return new ContainerTypeEntry(*this);
+}
+
+ContainerTypeEntry::ContainerTypeEntry(const ContainerTypeEntry &) = default;
+
QString EnumTypeEntry::targetLangQualifier() const
{
TypeEntry *te = TypeDatabase::instance()->findType(m_qualifier);
@@ -2839,6 +2860,20 @@ QString FlagsTypeEntry::targetLangApiName() const
return QLatin1String("jint");
}
+TypeEntry *EnumTypeEntry::clone() const
+{
+ return new EnumTypeEntry(*this);
+}
+
+EnumTypeEntry::EnumTypeEntry(const EnumTypeEntry &) = default;
+
+TypeEntry *FlagsTypeEntry::clone() const
+{
+ return new FlagsTypeEntry(*this);
+}
+
+FlagsTypeEntry::FlagsTypeEntry(const FlagsTypeEntry &) = default;
+
QString FlagsTypeEntry::qualifiedTargetLangName() const
{
return targetLangPackage() + QLatin1Char('.') + m_enum->targetLangQualifier()
@@ -3201,26 +3236,61 @@ CustomConversion* TypeEntry::customConversion() const
return m_customConversion;
}
+TypeEntry *TypeEntry::clone() const
+{
+ return new TypeEntry(*this);
+}
+
+TypeEntry::TypeEntry(const TypeEntry &) = default;
+
TypeSystemTypeEntry::TypeSystemTypeEntry(const QString &name, const QVersionNumber &vr) :
TypeEntry(name, TypeSystemType, vr)
{
}
+TypeEntry *TypeSystemTypeEntry::clone() const
+{
+ return new TypeSystemTypeEntry(*this);
+}
+
+TypeSystemTypeEntry::TypeSystemTypeEntry(const TypeSystemTypeEntry &) = default;
+
VoidTypeEntry::VoidTypeEntry() :
TypeEntry(QLatin1String("void"), VoidType, QVersionNumber(0, 0))
{
}
+TypeEntry *VoidTypeEntry::clone() const
+{
+ return new VoidTypeEntry(*this);
+}
+
+VoidTypeEntry::VoidTypeEntry(const VoidTypeEntry &) = default;
+
VarargsTypeEntry::VarargsTypeEntry() :
TypeEntry(QLatin1String("..."), VarargsType, QVersionNumber(0, 0))
{
}
+TypeEntry *VarargsTypeEntry::clone() const
+{
+ return new VarargsTypeEntry(*this);
+}
+
+VarargsTypeEntry::VarargsTypeEntry(const VarargsTypeEntry &) = default;
+
TemplateArgumentEntry::TemplateArgumentEntry(const QString &name, const QVersionNumber &vr) :
TypeEntry(name, TemplateArgumentType, vr)
{
}
+TypeEntry *TemplateArgumentEntry::clone() const
+{
+ return new TemplateArgumentEntry(*this);
+}
+
+TemplateArgumentEntry::TemplateArgumentEntry(const TemplateArgumentEntry &) = default;
+
ArrayTypeEntry::ArrayTypeEntry(const TypeEntry *nested_type, const QVersionNumber &vr) :
TypeEntry(QLatin1String("Array"), ArrayType, vr),
m_nestedType(nested_type)
@@ -3240,6 +3310,13 @@ QString ArrayTypeEntry::targetLangApiName() const
: QLatin1String("jobjectArray");
}
+TypeEntry *ArrayTypeEntry::clone() const
+{
+ return new ArrayTypeEntry(*this);
+}
+
+ArrayTypeEntry::ArrayTypeEntry(const ArrayTypeEntry &) = default;
+
EnumTypeEntry::EnumTypeEntry(const QString &nspace, const QString &enumName,
const QVersionNumber &vr) :
TypeEntry(nspace.isEmpty() ? enumName : nspace + QLatin1String("::") + enumName,
@@ -3263,6 +3340,13 @@ EnumValueTypeEntry::EnumValueTypeEntry(const QString &name, const QString &value
{
}
+TypeEntry *EnumValueTypeEntry::clone() const
+{
+ return new EnumValueTypeEntry(*this);
+}
+
+EnumValueTypeEntry::EnumValueTypeEntry(const EnumValueTypeEntry &) = default;
+
FlagsTypeEntry::FlagsTypeEntry(const QString &name, const QVersionNumber &vr) :
TypeEntry(name, FlagsType, vr)
{
@@ -3288,11 +3372,25 @@ SmartPointerTypeEntry::SmartPointerTypeEntry(const QString &name,
{
}
+TypeEntry *SmartPointerTypeEntry::clone() const
+{
+ return new SmartPointerTypeEntry(*this);
+}
+
+SmartPointerTypeEntry::SmartPointerTypeEntry(const SmartPointerTypeEntry &) = default;
+
NamespaceTypeEntry::NamespaceTypeEntry(const QString &name, const QVersionNumber &vr) :
ComplexTypeEntry(name, NamespaceType, vr)
{
}
+TypeEntry *NamespaceTypeEntry::clone() const
+{
+ return new NamespaceTypeEntry(*this);
+}
+
+NamespaceTypeEntry::NamespaceTypeEntry(const NamespaceTypeEntry &) = default;
+
ValueTypeEntry::ValueTypeEntry(const QString &name, const QVersionNumber &vr) :
ComplexTypeEntry(name, BasicValueType, vr)
{
@@ -3308,6 +3406,13 @@ bool ValueTypeEntry::isNativeIdBased() const
return true;
}
+TypeEntry *ValueTypeEntry::clone() const
+{
+ return new ValueTypeEntry(*this);
+}
+
+ValueTypeEntry::ValueTypeEntry(const ValueTypeEntry &) = default;
+
ValueTypeEntry::ValueTypeEntry(const QString &name, Type t, const QVersionNumber &vr) :
ComplexTypeEntry(name, t, vr)
{
@@ -3463,6 +3568,13 @@ QString InterfaceTypeEntry::qualifiedCppName() const
return ComplexTypeEntry::qualifiedCppName().left(len);
}
+TypeEntry *InterfaceTypeEntry::clone() const
+{
+ return new InterfaceTypeEntry(*this);
+}
+
+InterfaceTypeEntry::InterfaceTypeEntry(const InterfaceTypeEntry &) = default;
+
FunctionTypeEntry::FunctionTypeEntry(const QString &name, const QString &signature,
const QVersionNumber &vr) :
TypeEntry(name, FunctionType, vr)
@@ -3470,6 +3582,13 @@ FunctionTypeEntry::FunctionTypeEntry(const QString &name, const QString &signatu
addSignature(signature);
}
+TypeEntry *FunctionTypeEntry::clone() const
+{
+ return new FunctionTypeEntry(*this);
+}
+
+FunctionTypeEntry::FunctionTypeEntry(const FunctionTypeEntry &) = default;
+
ObjectTypeEntry::ObjectTypeEntry(const QString &name, const QVersionNumber &vr)
: ComplexTypeEntry(name, ObjectType, vr)
{
@@ -3484,3 +3603,10 @@ bool ObjectTypeEntry::isNativeIdBased() const
{
return true;
}
+
+TypeEntry *ObjectTypeEntry::clone() const
+{
+ return new ObjectTypeEntry(*this);
+}
+
+ObjectTypeEntry::ObjectTypeEntry(const ObjectTypeEntry &) = default;