Re: [pygccxml-development] pyplusplus status
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-07-18 07:53:52
|
On 7/18/06, Allen Bierbaum <al...@vr...> wrote: > What this comment really comes down to is that I don't think the current > API fullfills the goals set out at: > https://realityforge.vrsource.org/view/PyOpenSG/PyppApiDiscussion > > The big ones I find missing are: > > * Do not require the user to know anything outside of the high-level > API to accomplish most tasks. This will never happen :-(. py++ knows to export only limited subset of C++. > Please don't take offense to this Roman, but you understand the APIs of > pygccxml and pyplusplus so well and in so much detail that I think your > take on what is an "easy API" may be much more in depth then what I > would consider an "easy API". > ... > But having the simple API is still important > for allowing new users to pick it up and use the tool. With the power comes complexity. Also I would like to see your definition to "simple" and "power" API. My definition is next: simple - API defined by decl_wrappers package and module_builder package. Basically, this is get\set properties + "query" api. power - modifying directly code creators tree. This is really the "dark" area of the project, but I have an idea how to simplify it and of course I will write a documentation that will explain it. > Am I the only one that feels this way when using the API? I definitely would like to get the answer to this question with suggestions from other users. > You just say Template("class") and then instantiate templates. Very > straight forward in Pyste's domain specific lanaguage. Please contribute your code with small example and documentation( and license ) to py++ :-). I already added new directory for this in "contrib" one. > > mb = module_builder_t( ... > > , compilation_mode=pygccxml.parser.COMPILATION_MODE.ALL_AT_ONCE > > , ... ) > > Does this behave *exactly* the same way. Does it only create one entry > in the cache? Almost. pygccxml will create temporal file. I never checked how it will behave with a cache. Can you check this, and if the behaviour is not as you expect, I will try to fix it. > I would recommend just treating it like you would a .decls() call. ie. > if the users looks up declarations of differing types and then calls a > method on those decls that only makes sense for one type, then python > will display an error about the type problems. I prefer to continue to discuss this problem within the original thread. > 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. I think, this will be useful, but not now. There is only few peoples who contribute to the project. I started to work on FAQs: http://svn.sourceforge.net/viewcvs.cgi/pygccxml/pyplusplus_dev/docs/faqs/faqs.rest?view=markup If you have something specifiec in mind, or want to add documentation here and there, please do it. > I don't see how this pep fixes the problem, but then again I don't fully > understand what the pep will do. I will just trust you that this will > help out. This is pretty simple: this paper deals with method transformations. For example: void get_size( int& h, int&w ) You will be able to define the transformation of get_size to boost::python::tuple get_size() The function wrapper, you are talking about, it is just an "user defined" transformation. > def processClass(cls): > if cls.count("method"): > # do something > > I have run into a few cases where something like this could be pretty > useful and keep the script more understandable. I will see what I can do. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |