Re: [pygccxml-development] pyplusplus status
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-07-18 18:05:21
|
On 7/18/06, Matthias Baas <ba...@ir...> wrote: > No, I also think that most of the time it should be enough to stick to > the high-level API. > I would say this is more or less the case with my Maya bindings, but > then, I'm still using the "experimental" API instead of Roman's version. > I've just committed the current version of the API into the "contrib" > directory (subdirectory "pypp_api"). Would you mind to clean experimental directory? > My main script to generate the bindings can be found here (pypp_setup.py): > http://svn.sourceforge.net/viewcvs.cgi/cgkit/maya/trunk/maya_wrapper/ It will take some time to me to learn pypp_api and how you use it in your script. I will try to take a look on cache and ALL_AT_ONCE issue in next few days. > > Would it be useful to make the tutorial and howto a "live" document so > > everyone can contribute, add questions, make changes? If so, what about > > using a wiki so everyone can contribute and fix up the descrptions. > > Sounds like a good idea to me! I am not against this idea. I think that before we going to it we can improve existing documentation, faqs and how to. I prefer to have only 1 place, where user have to look for documentation. > I think you two are talking about somewhat different things here. > If I understand Allen correctly he wants to replace a method with his > own code instead of wrapping the original method. The original method > might even never get called in the wrapper code but the wrapper code > will still provide the same functionality. I also did that for methods > that deal with stuff like function pointers that need some manual > intervention anyway (even though in most cases I did actually call the > original method). "User defined transformation" does not have to call to original function. If you talk about function "replace" you are talking transformation, otherwise it is much easier to exclude function and to add reference to new function under same name. > The "call wrapper policies" (in my version they are still called arg > policies) are rather meant to attach additional code to a wrapper method > that surrounds the original method invocation. This surrounding code is > mainly used to transform input arguments or return values between Python > and C++ (which cannot be done by Boost.Python automatically in those > cases). One example is the often mentioned "void getSize(int& width, > int& height)" method which cannot be wrapped directly because of the > references. Think about method transformation as a generalization of your idea. > >>> - Add ability to add user code to namespace or global *without* having > >>> to use code creators directly > >> > >> I want to solve this problem, to this release. Can you write what you > >> want/need/expect > >> here? In other words I need use cases and how you see they should be > >> solved. > > > > I will have to think about this and get back to you. > > I take it your basically talking about the addStartText(), > addBodyTailText() methods that you implemented in the experimental > version, right? They are still available in pypp_api and I'm also using > them myself. Why you work so hard? You can start the editor you use every day. To write "start text" in it. ( The better name is - user defined declarations. ) Then using the technique described http://svn.sourceforge.net/viewcvs.cgi/pygccxml/pyplusplus_dev/docs/faqs/faqs.rest?view=markup section "How to add custom exception translation?" you can add it to module body. > >>> - Cache parsing and preparing query optimizer. If the input has not > >>> changed (the headers are the same) why do I have to wait for all the > >>> processing of the declarations and query optimization each time. Can't > >>> we cache all of that? > >> > >> Yes, but you can guess what the priority of this. Also I think that > >> solution for this > >> problem will be completely in the user code. > > Wouldn't that rather be located in the high level API where the queries > are made? (if it's in the user code it would have to be duplicated with > every new project) I think you missed the point. py++ can do( and may be some day will do ) the dirty job of updating decl wrapper classes within a cache, but the cache managment will be done completly from user code. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |