Re: [C++-sig] Adding method at run-time to class instances

2012-12-21 Thread Christophe Tornieri
Here is some code. The main idea is that I don't want to expose each derived module classes but only the interface IModule that contains all the necessary information at run-time. The following code is actually working but produces the following warning: to-Python converter for class ModuleConfig

[C++-sig] Adding method at run-time to class instances

2012-12-21 Thread Christophe Tornieri
Hi, Is-it possible to add methods to a class instance exposed in Python ? I mean at the object level. I have a class that is wrapped through another class. When an instance of this wrapper class is build at run time (through a Python call), I would like to expose some new methods. In my case, the

[C++-sig] Exposing function at run-time

2012-12-21 Thread Christophe Tornieri
Hi, class Base { } -- Christophe Tornieri Tech Lead, Software Architect Sub-sea division christophe.torni...@cm-labs.com http://www.vxsim.com/ ___ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-s

Re: [C++-sig] How to converter std::string* in boost.python?

2012-12-21 Thread Jim Bosch
On 12/21/2012 03:52 AM, simon zhang wrote: How to converter std::string* in boost.python?I have to handle some data of c++ in python.The data may be big.So I return a pointer to python. But there are some errors. If the data is big, and you really want to avoid a deep copy, the only way to us

[C++-sig] How to converter std::string* in boost.python?

2012-12-21 Thread simon zhang
How to converter std::string* in boost.python?I have to handle some data of c++ in python.The data may be big.So I return a pointer to python. But there are some errors. c++ #include #include class A {public: A() { data="342342fgsf"; ss=&data; } std::string *ss; s