Re: [pygccxml-development] How to do error checking?
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <ba...@ir...> - 2006-09-12 13:18:11
|
Roman Yakovenko wrote: > So, why don't you add to the "function ( final ) transformation_t" > class new method: "signature". I assume you mean the class function_transformer_t, right? This class cannot return the entire signature because it doesn't know it. Even the substitution_manager class cannot know the signature for sure as it just provides string substitution services. It's up to the code creator to determine how the final signature will look like. (Note: I'm describing the current implementation here, I'm not saying that this is the one and only way to go, it's how it currently goes) If you think this is not right, then we might have to introduce an intermediate object that is located between the substitution manager and the code creator (but at least so far, I wouldn't know what the difference between this object and the code creator would be). > This method will return [member|free] function type. As a string or as a type_t object? > 2. In decl_wrappers.class_t you "override" _readme_impl method that > will check for > the "problems". This method will be called from > creator_t.prepare_decls method You don't happen to have a call sequence diagram of all this, have you? (this would probably make things clearer, because I don't understand how a decl_wrapper object can know things that a code creator object will be doing) > Answer to the first question: you don't have to store "the data". Well, but in contrast to the tests that are currently done by Py++ this test cannot be done by inspecting the current declaration alone, but it also needs to know information about other declarations. So where does this information come from? > Answer to the second question: mem_fun_transformed_wrapper_t should > concern on > code generation and nothing else. So, it is a wrong place to put this > functionality to it. I'll try to keep that in mind... - Matthias - |