![]() |
Telelogic TAU (steve huntington) | ![]() |
profile :
search :
help :
dashboard :
calendar :
home
|
||
|
Topic Title: Inheritance Topic Summary: Created On: 2-Aug-2006 19:24 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Preface: we are using TAU 2.5 at our company for the moment. We'll be upgrading to TAU 2.7 within a few days. I've also submitted this as a support case.
I can't seem to figure out how to properly model inheritance in TAU. Let's say I have a class A with an attribute called "foo". The type for "foo" is class C. Class D inherits from class C. I have a class B that inherits from class A. 1) Suppose "foo" is protected or public. How do I make "foo" show as an inherited attribute in B when I place a presentation of B on a diagram? I figured out that you can manually drag "foo" from A into B to make it appear, but is there a better way to do it than that? 2) Suppose "foo" is private. Theoretically I should not be able to use the previously described method to make "foo" appear in B. However, I am able to do so. Shouldn't B not inherit "foo" because it is private in A? Am I not actually doing what I think I'm doing? 3) How can I easily make it so that attributes are visually represented as both attributes in a class and associations from the owner class to the attribute type at the same time in a class diagram? For example I have A and C in a class diagram. How can I easily have both of the following: "foo" as an attribute inside A and a "foo" association from A to C? 4) How can I create a "foo" association from A to D? From B to D? Thanks! Michael Ho SIAC Edited: 2-Aug-2006 at 21:24 by Michael Ho |
|
![]() |
|
![]() |
|
Michael
Hopefully you'll be upgrading to TAU 2.7.1 (released last week) which has some significant new features above 2.7.0. 1) I assume you're dragging foo from the Model View onto the symbol for B. AFAIK there isn't any other way to visualise inherited features on diagrams at the moment. You could put in an Enhancement Request describing how this might work? 2) The drag/drop doesn't respect privacy, but you will get check/autocheck errors if you try to access the attribute through B. 3) For the model you've got: drag A and C onto a diagram, start an association line from A and instead of left-clicking on the symbol for C, right-click->reference existing->foo. To show foo on the symbol A also, right-click->SHow/Hide->Show Attributes. You can change the default (so that attributes are shown on a symbol when it is created) through Tools->Options...->UML Basic Editing->Default Class Symbol Appearance. 4) You could create these on a diagram, but by doing so you would be creating new relationships, which probably isn't what you want. Like your question 1, AFAIK there isn't a way of visualising inherited association relationships, but you could raise an ER for this too if you can think of a good way for it to work. 2.7.1 has a new context menu entry 'Generate diagram' which can automatically create diagrams of e.g. the inheritance relationships for a class. Also it would be possible to develop an addin which reports for a class all the features it inherits; your local Telelogic Professional Services organisation will be able to help with this if it would be useful. HTH Ian ------------------------- ============= Ian Barnard Principal Consultant Telelogic UK, an IBM company |
|
![]() |
|
![]() |
|
for item 1) we are already working on it. We had originally planned it for 2.7.1 but didn't have time. So, it is now in Implementation and should appear (barring any major issues) in 3.0. It's way too early to confirm it but we are at least giving it a try.
Greg ------------------------- Greg Gorman Vice President, Product Management Modeling and Test Products Telelogic AB |
|
![]() |
Telelogic TAU
» TAU/Developer
»
Inheritance
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.