diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-14 15:18:19 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-14 16:40:49 -0200 |
commit | 67f0c4988020833210537757fbd51ecb84825ce8 (patch) | |
tree | 805db73764d91ab3d6e9ea8d87b51207eeb343ca /libshiboken/CMakeLists.txt | |
parent | c40f61ff076928f07591070763069cc75918768e (diff) |
Implemented type discovery feature.
The problem:
- There are two class, A and B, B inherits from A.
- You are inside a virtual method reimplemented in python with just one parameter of type A*.
- But the object referenced by a variable of type A* is an instance of B and it was created by C++,
not Python!
- Shiboken needs to create a PyObject of type B, not A! This does not makes sense for C++, but does
for Python, because python variables does not store type information, just values.
To achieve this we use RTTI to get the real type name of a variable, then we create the PyObject using
the TypeResolver infrastructure initially developed to help with signal slot problems. In other words,
the TypeResolver class has been moved from libpyside to libshiboken.
Diffstat (limited to 'libshiboken/CMakeLists.txt')
-rw-r--r-- | libshiboken/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libshiboken/CMakeLists.txt b/libshiboken/CMakeLists.txt index f36567d63..3cc0a5618 100644 --- a/libshiboken/CMakeLists.txt +++ b/libshiboken/CMakeLists.txt @@ -14,6 +14,7 @@ basewrapper.cpp helper.cpp pyenum.cpp bindingmanager.cpp +typeresolver.cpp ) include_directories(${CMAKE_CURRENT_SOURCE_DIR} |