aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.cpp
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2010-02-04 11:46:22 -0400
committerHugo Lima <hugo.lima@openbossa.org>2010-02-04 18:47:27 -0200
commit8236fa3c1dda5674d4449726d018026b2682a569 (patch)
treec1a3c5c6e8047a4bb9069b14e32fe617c4ac5a6f /shibokengenerator.cpp
parenta761b0b0e439811fb2ce8b9a64b249f50cad02a5 (diff)
Implement ShibokenGenerator::isCopyable based on BoostPythonGenerator
Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r--shibokengenerator.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index 1ee65d94e..8a4a4eba0 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -1142,6 +1142,19 @@ QString ShibokenGenerator::getModuleHeaderFileName(QString modName) const
return QString("%1_python.h").arg(modName.toLower());
}
+bool ShibokenGenerator::isCopyable(const AbstractMetaClass *metaClass)
+
+{
+ if (metaClass->isNamespace())
+ return false;
+ else if (metaClass->typeEntry()->copyable() == ComplexTypeEntry::Unknown)
+ return metaClass->hasCloneOperator();
+ else
+ return (metaClass->typeEntry()->copyable() == ComplexTypeEntry::CopyableSet);
+
+ return false;
+}
+
/*
static void dumpFunction(AbstractMetaFunctionList lst)
{