Roman Yakovenko wrote:
> On 9/21/06, Matthias Baas <ba...@ir...> wrote:
>> rom...@us... wrote:
>> > Log Message:
>> > -----------
>> > adding support for associated_decl_creators to file writers
>>
>> Can you please elaborate on those changes and let me know what a user
>> has to do to adapt to those modifications?
>> Currently, it seems that the code creators that I add to the
>> associated_decl_creators list don't get written anymore.
>
> Yes of course. First of all I committed new version that should fix the
> problem.
No, it doesn't (because now the class mem_fun_transformed_wrapper_t is
not instantiated).
Unfortunately, I also have to say that I'm not that happy about the
workaround to force the generation of a wrapper class. This is a step
back from what was already there. The comment you put into the code
("function transformers require wrapper") is not true. The majority of
classes in the Maya SDK (which do use function transformers) do not
require a wrapper class and I'd like to keep it that way. To quote yourself:
"The generated code should not be too different from the one, that human
would write. I don't write code like this."
I know that for some reason you do want to have wrapper classes in all
cases. That's why I would have added an option to control this.
Actually, we could have reused an option that was already there once:
finalize. But as you reacted somewhat testily on this topic I postponed
the implementation of this functionality until this feature is
implemented (besides that, the function transformers already do add
themselves to a wrapper class if there is one, but they just don't force
the creation of a wrapper class).
> self.curr_code_creator.associated_decl_creators.append(fwrapper)
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> You had bug in this line. You did not added fwrapper to code creators tree.
> Thus you did not defined its logical place. Thus
> multiple_files_t.associated_decl_creators ignored it.
All right. I've seen that you moved the associated_decl_creators list to
the class registration_based_t which is a base class for calldef_t. So
far so good. But how is this list used? What are the requirements on the
code creators that may be put into this list?
Just to test how it behaves, I added a code creator to the list of a
wrapper function creator to see where it gets written. But I never
noticed a difference, no matter if it was inside
associated_code_creators or not. If the code creator was not hooked into
any other part of the code creator tree, it didn't get written at all
and if it was added to the root, it just got written into the main C++
file.
So how is this feature used?
- Matthias -
|