Re: [pygccxml-development] declarations string, stability
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2007-12-10 18:52:35
|
On Dec 10, 2007 8:09 PM, Ben Schleimer <bsc...@lu...> wrote: > > > > > I almost agree with you. I could improve the interface, > > meanwhile you can use decl_visitor_t ( > > http://language-binding.net/pygccxml/apidocs/pygccxml.declarat > > ions.decl_visitor.decl_visitor_t-class.html > > ) > > class and apply_visitor function ( > > http://language-binding.net/pygccxml/apidocs/pygccxml.declarat > > ions.algorithm-module.html#apply_visitor > > ) > > Oh, I didn't know about that functionality. Well, I'll definitely try > using it next time... Where would you look for such thing? > > > > > I know this would be useful because I had to search for > > decls based on > > > their attributes which wasn't a param in > > scopedef.member_functions(..) > > > so I had to manually test the attributes anyway. > > > > So why do you need visitor? You already know that you need > > member functions, the only thing left is to specialized the > > query. This is easily done by passing a callable to the > > member_functions function: > > > > ns.mem_funs( lambda x: len( x.arguments ) > 19 ) > > > > Argg, again, I didn't know about it because its not mentioned anywhere > in the documentation. > Maybe again a paragraph about decl_visitor_t and callable would make > them more clear to the > End users. It is described here: http://language-binding.net/pygccxml/query_interface.html#usage-examples -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |