Book a Demo

Author Topic: Shouldn't an object have its class's interfaces?  (Read 6210 times)

lp

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Shouldn't an object have its class's interfaces?
« on: January 18, 2008, 09:10:50 pm »
Short version:
--------------
I wish I had a convenient (one-step) way to drop an object instance into a Composite Structure Diagram, along with all the interfaces (including embedded ones) that the class definition says it has.
Does this conflict with the proper use of UML?  ???
Is the lack of this facility a bug?  ???

Long version:
-------------
EA Version 6.5.806

I want to document how my team is going to build big objects by wiring together the interfaces of smaller objects--  Composite Structure Diagrams should be just the ticket (...and if they didn't exist I'd use Object Diagrams).
In most cases, the interfaces are attached to ports (as opposed to realized / used by the classes directly).

I'd like to be able to drop an instance of a class onto the Composite Structure Diagram, and show the interfaces (lollipops and pincers) that its class definition says it has.
The closest I can get is that if I check "include Embedded Elements", then it shows the object's ports.  But to see the interfaces (which I tacked onto the class definition over in the class diagram), I have to add them ONE-BY-ONE, to EACH OBJECT.  This is really, really tedious.

My UML question is...
If ClassA has a port with certain interfaces, then shouldn't an instance of ClassA also have that port with those interfaces?

Even it is not required by UML, then... why not?  and isn't it still a natural case for EA to support more conveniently?

Note also:
** The port in the instance isn't really linked to the port in the class-- if I change its name in the class, it doesn't change on the instance.  (The second thread referenced below, someone .)
** If I drop a class into the same diagram as a simple link, and check the "include Embedded Elements" box, then I get what I expect: the class is shown with all its ports and the provided/required interfaces.  I'd settle for the same thing in instances.

Related Threads That Were Helpful
---------------------------------
A couple old threads were helpful in narrowing down my confusion enough that I could frame the questions above...
(1) UML Process / "Does a class inherit Ports and interfaces" (July 2007).
That thread helped me begin to understand the distinction between (a) a class providing/requiring an interface (a) directly as an association from the class to the interface), and (b) first adding a port to the interface, and then adding the provided/required interfaces to the port.  In my application the port version is more appropriate in most cases.

(2) General Board / "Assemblies and Interfaces - Can they be related?" (July 2007).
That thread had various related points.
« Last Edit: January 18, 2008, 09:13:21 pm by lp »

"A machine is more than the sum of its parts, but a living creature is far, far more."
(from The Economist)