Re: [pygccxml-development] How to add a new function to an individual file?
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2006-09-11 09:40:46
|
On 9/11/06, Matthias Baas <ba...@ir...> wrote: > So the associated_decl_creators property seems to be what I meant above > (a way to specify that a particular code creator belongs to the same > file than a particular class). :) Yes > But there's another problem now. How can the member function creator > obtain a reference to its parent class creator (so that it can access > the associated_decl_creators property) using parent property :-) > or rather: *when* can it do that? Every function transformation consist from 2 parts: function wrapper definition and registration, right. Take a closer look on creator_t class. When you create relevant code creators you have to inject them to the right position. In your case you will have to add wrapper to the tree and to the associated_decl_creators. But still I prefer you to add it to the class wrapper. Please do it this way. > During construction of the member function creator it is not yet added > to the code creator tree, so its "parent" property isn't initialized > yet. And when it is added later on it doesn't get notified about this > and I haven't seen another place where it could do initializations parent is initialized when you call adopt_creator method. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |