[pygccxml-development] mdecl and methods that return values
Brought to you by:
mbaas,
roman_yakovenko
From: Allen B. <al...@vr...> - 2006-05-29 23:48:25
|
I just ran into an interesting limitation on the current API. Namely, when you call methods on mdecl_wrappers and those methods return decls for further processing, the return values are ignored. I ran into in the following case: my_class = my_namespace["MyClass"] my_class["mymethod"].exclude() It could also come up in something else like this though: similar_classes = my_namespace.classes(re_matcher(".*Proxies")) similar_classes.member_functions["bad_function"].exclude() The point is that that the call_redirector_t for mdecl_wrapper doesn't return any values from the methods it calls. I propose that we refactor this method to build up a list of decls returned from all the calls it makes and return them wrapped as a mdecl_wrapper_t if there are values returned and if they make sense to combine (ie. if they are all decl wrappers). This should allow functionality like above and would add quite a bit of flexibility to finding groups of matches within other groups of matches. (ex: find groups of similar methods inside groups of similar classes) Any comments? -Allen |