Re: [C++-sig] When not to use static boost python library

2010-05-13 Thread Kun Hong
Nat Goodspeed wrote: I guess what the problem is should be that: another python extension, written in boost python, cannot access the types and functions exposed in my current extension. I am not clear why is it so, becaused it is exposed to the python interpreter already. If there are two py

[C++-sig] How to wrap reference to abstract base class to get C++ polymorphism

2010-05-20 Thread Kun Hong
Hi, I have a maybe entry-level question. But it really troubled me for a while. I need to wrap a C++ library which has some factory method to return references to some abstract base classes. So the implementation is hidden. If I want a python equivalent to the abstract base class reference

Re: [C++-sig] [Py++] Undefined symbols for static const int member of class

2010-05-21 Thread Kun Hong
On 21/05/2010, at 8:05 PM, Brian O'Kennedy wrote: Hi, I'm wrapping a very simple class using PyPlusPlus. snip class testclass { public: static const int a = 99; }; /snip And Py++ exposes the static member with a def_readonly("a", testclass::a ) call. When I impo

Re: [C++-sig] How to wrap reference to abstract base class to get C++ polymorphism

2010-05-25 Thread Kun Hong
On 20/05/2010, at 11:03 PM, Kun Hong wrote: Hi, I have a maybe entry-level question. But it really troubled me for a while. I need to wrap a C++ library which has some factory method to return references to some abstract base classes. So the implementation is hidden. If I want a python

[C++-sig] When not to use static boost python library

2010-05-11 Thread Mr Kun Hong
Hi, I am new to boost python. I have some experience making python extension using pure C. Now I have a question: when should I not use static boost python library? I tried to search the archive a bit. But haven't found a good answer. I read the boost python library documentation, where the sect

[C++-sig] RuntimeError(Pure virtual function called) when using iterator with abstract class

2010-05-17 Thread Mr Kun Hong
Hi all, I am new to Booth Python. I am trying to make a python wrapper for one of my job's C++ library. But after reading the docs and related mailing list archive, I am still stucked. :( If any one can shed some light on me, it is greatly appreciated. Below is a simplified version of the libra

[C++-sig] RuntimeError(Pure virtual function called) when using iterator with abstract class

2010-05-17 Thread Mr Kun Hong
Hi all, I am new to Booth Python. I am trying to make a python wrapper for one of my job's C++ library. But after reading the docs and related mailing list archive, I am still stucked. :( If any one can shed some light on me, it is greatly appreciated. Below is a simplified version of the libr