Re: [pygccxml-development] pygccxml querying
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2008-11-01 11:16:09
|
On Sat, Nov 1, 2008 at 12:06 PM, Paul Melis <pyp...@as...> wrote: > Roman Yakovenko wrote: >> As I promised, I checked how the querying for declarations works. >> Basically you can search for a declaration: >> * using full name - "::x::y::z" >> * using its name only - "z" >> >> In the past, I choose this method to prevent confusions. >> > Thanks for verifying! >> Pay attention, searching for "x::y::z" will not work and will raise an >> exception. >> > That's good to know, I indeed was expecting that form to work, but it > makes sense to exclude it. Good. > Is there a way to match (part of) a declaration on by string? Say I want > all methods that have parameter types with some string S in them, where > I just want to match the declaration string. mb = module_builder_t(...) mb.global_ns.decls( lambda d: 'xyz' in d.decl_string ) Is this what you are looking for? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |