![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Inheritance RiC 7.0 Topic Summary: Created On: 1-Feb-2008 00:39 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||||
I have some problems with the CG mechanism regarding inheritance in RiC 7.0.
Situation: Mainclass (CLASS MAIN) Base class (CLASS A) with a link to the main class (itsMAINCLASS) and a state chart, which has references to the CLASS MAIN. Derived class (CLASS B) from CLASS A. with the same state chart. Problem: The state chart of the CLASS A works fine but the state chart of the CLASS B reports an error because there is no link (itsMAINCLASS). looks like the link is not inherited by the CLASS B (it does not appear in the source code either). But if i try to create a link with the same name (itsMAINCLASS) it reports an error because "There is already a role with this name". Of course i can rename the link to (itsMAINCLASS_1) but then i have to change all the references in the state chart too and i don't want to do that. Maybe somebody already experienced such a problem with RiC7.0 and can explain me why the Inheritance does not work as i want it to ![]() thanx in advance MIKE I could post a piece of code if i explained the problem to weakly. Edited: 1-Feb-2008 at 00:41 by mike t |
|||||
![]() |
|||||
![]() |
|||||
maybe i was not very clear in my original post. So i try to explain it a little bit further.
I have a model with 3 classes (see attached) The Main Class struct Street { ... int busy; /*## attribute busy */ struct CAR itsCAR; /*## classInstance itsCAR */ ... } a class linked to the main class as a part in the CSD with a created link to the class Street struct CAR { ... struct Street* itsStreet; ... } now i can easily refer to the main class by using this link like: me->itsStreet->busy = 2; If i derive this class, the link is not derived as well struct SportsCar { .. no link to itsStreet } I i try to create the link manually i get an error "cannot add relation. case already has a relation with this name!" so my only way is to create a relation with another name which is not a good option because then i have to change the code in every derived object if i want alter things in the Street class, or send an event to that class. hope this time my explanation is better and somebody give me a hint of whats wrong. lg Mike p.s.:i attached the source files with the error in the derived class
|
|||||
![]() |
|||||
![]() |
|||||
I was wondering if inheritance is supported in RiC (7.0) at all?
When I use some inheritance in my class diagram and try to generate code, all I get is following warning: "Warning: Code generation ignores inheritance in C." Is there a property that must be set, or is it not supported at all? thanks! |
|||||
![]() |
|||||
![]() |
|||||
Inheritance is not supported, when using Rhapsody in C.
This is one of the main limitations when using the language C in Rhapsody, compared to C++. |
|||||
![]() |
|||||
![]() |
|||||
IC i feared that this might be the problem. Hope that the Rhapsody Team finds a solution for that in future releases.
regards mike |
|||||
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
Inheritance RiC 7.0
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.