Weird Code Generation
Weird Code Generation
05.11.2009 13:35
I am working under Rhapsody 7.5 and have a problem with the code generation in Herschel (RiC, Nios2, GNU-Tools).
I have a class in which some operations are public but I get no prototypes in the class.h file for these public operations. The only prototypes in the .h file are the ones of the Constructor and Destructor.
Another funny thing in this case is, that in the .c file of the class all public operations have a prototype like entry at the end of the file under the realisation of the operations.
Re: Weird Code Generation
06.11.2009 12:34
Hi Atri
I think that the effect you see is because of the "Source Artifacts". You can switch on source artifacts under Edit/Browser (Be sure to select the browser window first). Switch on Show Source Artifacts and you will see that in the browser tree under the class there are source artifacts. When you delete these you will see that the code will be generated as you expect.
What happens is that Rhapsody has a mode called "Code Respect" (Which is default) whre every change you make in a source file, intentional or not, will be respected and kept in the source. You can switch of that behaviour in a model property, search for respect.
Hope this helps and I wish you all the best in your UML quest!
Re: Weird Code Generation
09.11.2009 11:56
Hi Walter,
thanks for the answer.
I fixed the problem with copying the class, delete the original and rename the copied class to the original name. After that the code generation works as expected.
Atri

