Re: [pygccxml-development] Additional attribute functionality
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2007-12-05 19:26:53
|
On Dec 5, 2007 8:31 PM, Ben Schleimer <bsc...@lu...> wrote: > It is hard to come with good example for pygccxml only classes, partly > because declaration classes doesn't contain functionality, but only data. > > For Py++ it is very easy, for example update some property for all selected > declarations: > > decls = class_.decls( some condition ) > decls.xxx = yyy > > Or even > > class_.decls( some condition ).xxx = yyy > > it is much shorter than > > [ d.xxx = yyy for d in class_.decls( some condition ) ) > > But may be you are right. I will think about this point. > > If this functionality works, then it would be VERY good to add the above > comments to the code and/or documentation. My English is not as good as I want. I will appreciate any patch to the documentation: http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pygccxml_dev/docs/query_interface.rest?view=markup > I didn't understand that you could do this before. However, I think that > having query operators that return lists of decls would be good because > it provides more functionality then mdecl_wrapper_t, you can concatenate > lists together and it leaves open the possibility of adding functionality to > decls. In this case I think I will enrich mdecl_wrapper_t interface, may be I can derive it from the list class. I will check. > This doesn't mean you need to remove the mdecl_wrapper_t functions, they are > pretty innovative... Thanks P.S. Your comments were really helpful -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |