aboutsummaryrefslogtreecommitdiffstats
path: root/shibokengenerator.cpp
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-02-20 18:18:34 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-02-20 18:33:31 -0300
commita71641d51bca4ca7ae4435f7674b7b33dab39457 (patch)
treee39f00a1e52183104bb943934605f3f6e7da29af /shibokengenerator.cpp
parent5ce831e73fc4b8bee7a5b62d7485eee11f498a92 (diff)
Adds the convenience method 'isPairContainer' to ShibokenGenerator.
It checks if an AbstractMetaType represents a C++ pair container. Also updated code to make use of the new method. Reviewed by Lauro Moura <lauro.neto@openbossa.org>
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r--shibokengenerator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index 46f7083d1..e212eb85a 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -559,6 +559,12 @@ bool ShibokenGenerator::isCString(const AbstractMetaType* type)
return type->isNativePointer() && type->name() == "char";
}
+bool ShibokenGenerator::isPairContainer(const AbstractMetaType* type)
+{
+ return type->isContainer()
+ && ((ContainerTypeEntry*)type->typeEntry())->type() == ContainerTypeEntry::PairContainer;
+}
+
bool ShibokenGenerator::shouldDereferenceArgumentPointer(const AbstractMetaArgument* arg)
{
return shouldDereferenceAbstractMetaTypePointer(arg->type());