Weird Code Generation

1488 Betrachtungen
Seite: 1
atri
avatar
Community Member
10 Beiträge

Weird Code Generation

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.

Walter
avatar
Moderator
29 Beiträge

Re: Weird Code Generation

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!

atri
avatar
Community Member
10 Beiträge

Re: Weird Code Generation

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

Seite: 1

Currently Online:

There is nobody online.

Welcome to our latest member: lammils