Refining the hierarchy of reactive classes
You can refine the hierarchy of reactive classes without using overrides and unoverrides (without losing any information).
About this task
For example, suppose you have class C
inheriting
from class A
, as shown in the following object model
diagram.
Suppose you want to change the hierarchy so C
inherits
from B
, which in turn inherits from A
.
Therefore:
- The statechart that
C
inherited fromA
is now inherited fromB
;B
inherits its statechart fromA
. - The inheritance between
A
andC
is deleted. C
does not lose any information because its inherited elements reference new GUIds.
To change the hierarchy:
Procedure
- Using either the browser or the Diagram
Tools, create inheritance between
B
andA
. - Create inheritance between
C
andB
. -
Rhapsody®
displays a window that informs you that you are adding a level of inheritance, and asks you to
confirm the deletion of the inheritance between
C
andA
. Click Yes.
Results
The following figure shows the revised object model diagram.