Re: [pygccxml-development] How to manage wrapper classes?
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-03-24 18:42:09
|
On 3/24/06, Matthias Baas <ba...@ir...> wrote: > Hi, > > let me first state the problem I'm currently trying to solve. The Maya > SDK defines its own string class MString which is part of my bindings. > Any function that expects a string as input actually expects a MString > object. But for the Python version I would also like the functions to > accept regular Python strings as well (and maybe even return Python > strings instead of MStrings but I leave that up for later). I tried to > use the implicitly_convertible construct but it didn't work. I could get > it to work with a string class that also accepts a std::string in its > constructor but the MString class only accepts const char* which didn't > work for me. Lets skip the rest. Here is what I propouse to you: http://boost.org/libs/python/doc/v2/faq.html#custom_string and take a look on pyplusplus QtXML example. If it does not help you then we will discuss the rest. If you decide to use this solution, than you have few choices how to integr= ate that solution with pyplusplus. Hope this was helpful. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |