summaryrefslogtreecommitdiffstats
path: root/libshiboken/typeresolver.h
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-06-15 19:27:54 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-06-17 15:23:44 -0300
commit9214943397eb156d79c6b762460a28d458366995 (patch)
treeec9a586ba3b5ce7e25b55e5563f4fd5d74552a3d /libshiboken/typeresolver.h
parent8671479384870a0c6f819f333adde85e66213756 (diff)
downloadshiboken-9214943397eb156d79c6b762460a28d458366995.tar.gz
shiboken-9214943397eb156d79c6b762460a28d458366995.tar.xz
shiboken-9214943397eb156d79c6b762460a28d458366995.zip
Create getType function on TypeResolver.
This function allow the programmer discovery if a type is Object or Value type. Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>, Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'libshiboken/typeresolver.h')
-rw-r--r--libshiboken/typeresolver.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libshiboken/typeresolver.h b/libshiboken/typeresolver.h
index 1f4c4642..a55c0e56 100644
--- a/libshiboken/typeresolver.h
+++ b/libshiboken/typeresolver.h
@@ -77,6 +77,13 @@ void initTypeResolver();
class LIBSHIBOKEN_API TypeResolver
{
public:
+ enum Type
+ {
+ ObjectType,
+ ValueType,
+ UnknownType
+ };
+
typedef PyObject* (*CppToPythonFunc)(void*);
typedef void* (*PythonToCppFunc)(PyObject*);
typedef void (*DeleteObjectFunc)(void*);
@@ -96,6 +103,7 @@ public:
return new TypeResolver(typeName, &objectTypeToPython<T>, &pythonToObjectType<T>, SbkType<T>());
}
+ static Type getType(const char* name);
static TypeResolver* get(const char* typeName);
const char* typeName() const;