[pygccxml-development] [FT] small issue
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-09-24 18:45:44
|
Hi Matthias. Next code is cut-and-paste from creator_t.visit_member_function required_headers = getattr(fwrapper, "get_required_headers", lambda : [])() This code is problematic for next reasons: 1. When we talked about [FT], we thought that user will be able to add custom function transformation, without understanding of code creators, right? I think, that putting "get_required_headers" on code creator is a little bit problematic. 2. There is small design violation: creator_t should not talk to code creators. creator_t is a factory. As such it should ask for required headers from function transformation. 3. I don't "getattr(fwrapper, "get_required_headers", lambda : [])()" this code. In my opinion if you right such code, it means that there is a problem with the design and I think this is true in our case. The solution to the problem is to introduce base class for all transformations and a class that aggregates all these transformations. I don't understand why you don't want to introduce these classes? -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |