[pygccxml-development] How to add a new function to an individual file?
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-09-10 08:48:46
|
Hi, I'm currently trying to support the function transformers on non-virtual functions (i.e. mem_fun_t). It works fine when the corresponding class also has virtual functions so that a wrapper class gets created anyway and there's a place where I can stick the wrapper for the non-virtual function. But if Py++ does not create a wrapper then there's no "hook" where I could add the wrapper function. As far as I can tell there doesn't seem to be a way to add a node to the code creator tree that will only appear in the source file for one specific class. Would it be possible that during the creation of the code creator tree Py++ also creates special nodes such as, for example, translation_unit_t which marks the root of everything that goes into a particular file? Each wrapper class node would then be a children of the corresponding translation unit node. Instead of filtering out class nodes the multiple file writer would then have to filter out the translation unit nodes and stick everything beneath such a node into one file. That way, the user would have the option to put arbitrary nodes into one specific file. Or is there already a simple workaround to get the above behavior? - Matthias - |