Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - F@lk

Pages: [1] 2 3
1
General Board / What is this "infinity"-icon and how can I hide it?
« on: May 31, 2023, 07:02:57 pm »
What is this "infinity"-icon and how can I hide it?
https://www.dropbox.com/s/ixksgtw55jv6ioy/20230531_104801.jpg
Thank you
-- F.bre

2
Uml Process / Re: How to create a "has"-relationship between 2 objects?
« on: December 11, 2020, 10:02:13 pm »
No, but you can name the instance of class B and then set that as the corresponding attribute's value in the A instance's run state.
I see. Hmm, I actually want the arrow to be of type "has".


In UML, such relationships are expressed using classes. Since every instance of a class will "have" the same contents, there's no point in expressing that in object diagrams.
I want to create a software structure survey, and I have an object "server" having 3 members (=attributes) of class "Connection". Each connection calls its own callstack to different connected objects. I need the has-relationship arrow to illustrate such scenario. This is for the docs to show via UML how the main software concept is built.

3
Uml Process / Re: How to create a "has"-relationship between 2 objects?
« on: December 11, 2020, 09:35:42 pm »
...express the relationship at the class level as attributes...
I parsed my C++ source code and there is actually already that relationship because the classes have their proper attributes, I mean class A has an attribute of class B.

...and then in the objects set the run state of the containing object to the name of the contained object...
What do you exactly mean here? Is it something how I can tweak the accociation arrow between two objects?

Furthermore, I tried a Composite Structure diagram but it also has no support of "has"-relationship arrows between objects. I just wonder what such "property" stuff means, which makes no sense if you have parsed C++ classes with attributes and methods and create object instances from them.

4
Uml Process / How to create a "has"-relationship between 2 objects?
« on: December 11, 2020, 08:38:34 pm »
Hi,

I have an object diagram with 2 objects I created by drag'n'drop from the model tree which was parsed from my C++ source code. I noticed there is not automatically an arrow between two objects although one object is an attribute of the other object and there is also a parent pointer back. So I manually created an accociation arrow between both created objects. But now the question is how can I show a "has"-relationship? My toolbox just offers: Accociate, Depedency, Realize, Trace, Information Flow, Abstraction, Substitution, Usage, Derive, Refine, Responsibility, Note Link. I have the feeling they are all not what I understand as "one has the other one"-relationship.

Thanx in advance,
-- F@lk

5
But whatever works for you is fine

This is the background of it all: https://www.dropbox.com/s/zp6rsqktc0uu8jt/20201211_094700.jpg?dl=0

You can see, first I used classes and ports to (wrongly) use them to show important call stacks in my software.
Now when I try to use proper UML syntax for call stacks by using objects, actions and dependencies of stereotype <<call>> you can see it all becomes quite space-consuming and hard to create. You know, it's just a part of the actual diagram which actually shows the survey for all 15 main objects we have in the core software, and how the control flow via the main calls is wired. I wish there was more support for such stuff which is essential for software modelling, because I have the patience but my team mates have not. They refuse UML because it's all so complicated to fastly create a diagram e.g. showing how objects are wired with important calls. ...And it takes so much space now while it could be smaller if you look at my first attempt which is the upper diagram.

(P.S.: The object "ProcessingFinished" in the lower diagram is actually a sub-object, and two such objects are connected with a signal-slot call mechanism. "Enqueue" is a method of the base class of the object.
BTW: Another big issue with Sparx EA is the problem that I have to manually rename actions if I rename methods and attributes of classes in the model tree. Actually a killer if one has 20 diagrams and has to refactor all UML actions after renaming class methods.)

6
No, I meant something like this (no control flows)
... snip...
aha OK, you meant a "dependency" with stereotype "call". Hmm, I tried it but must say it is very time-consuming to create a diagram this way, because depedencies as calls are not part of the toolbox but I have to go quite deep into the submenus to do such setup.
When I additionally create the caller objects of such call actions, it turns out it's also time- and space-consuming to create a diagram with 10 objects each one having 3 calls. I wish there was better modelling support especially for software.

7
I personally would either use CallOperationActions on an Activity diagram linked by something like a <<call>> Dependency, or use EA's profiler against running software.

Do you mean such construction, where a and b are class instances and op1 and op3 are actions (all created by drag'n'drop from the model tree which was created from parsing the C++ source code)?:
Code: [Select]
+------+                +------+                +------+                +------+
|      |          use   |      | control flow   |      |           use  |      |
|  a   |--------------->|  op1 |--------------->|  op3 |--------------->|  b   |
|      |                |      |                |      |                |      |
+------+                +------+                +------+                +------+


8
I want to show the spatial structure of the program, which means the class instances living in the program, independently of the time.
This doesn't make sense. Instances are by nature time-dependent: they get created, exist for a time and then they are deleted. Classes are independent of time, but instances are not.
When I want to show the scenario of all important objects in my software, and when I want to show in my diagram how they are connected to each other by important method call chains (callstacks), I need a structure diagram. I can for instance have 3 objects of the same class which are all processed by a relevant method call chain (callstack), pipelining so to speak.

Quote
And I want to show important callstacks, starting from one object via several method calls to another object aiming in a target method call.
So the start point of the arrow is in my example A::op1() but the end point is B::op3().
This is not permitted in UML. Connectors link elements, they do not link operations (or attributes).

EA does have the Link to Element Feature function, which allows you to pseudo-link a connector to an attribute or an operation, rather than to the element as a whole (pretty much a direct violation of UML syntax). But that only works with attributes/operation defined in the element -- ie classifiers, not instances, and not inherited features. So if you want to use that function you'll have to use classes, not objects.

/Uffe

At present I used the port connectors for my purposes, and connect 2 ports with a call chain accociation, and label the outgoing port of object 1 with the name of the lowest callstack method, and label the incoming port of object 2 with the name of the highest callstack method.

Code: [Select]
+------+                +------+
|      | op1         op3|      |
|  a   #----------------#  b   |
|      |                |      |
+------+                +------+

(# is that port quad. I know port has actually another UML meaning but I raped it for the sake of the missing UML feature)

9
If you've got the operations modelled as UML operations (in class elements), you can use CallOperation Actions in an activity diagram

An activity program means the blocks are events which happen at a certain time, and the arrows give the path of how the timeline runs from even to event. This means an activity diagram is not what I can use, because I don't want to show events in a timeline. I want to show the spatial structure of the program, which means the class instances living in the program, independently of the time. And I want to show important callstacks, starting from one object via several method calls to another object aiming in a target method call.
So the start point of the arrow is in my example A::op1() but the end point is B::op3().
I notice I cannot use a communication diagram for this because there is no concept of arrows which have a different meaning of the start point than the end point, but an arrow is always a single method call in such diagram type, which is a restriction that makes it impossible to model software call stacks between objects.

10
I would use sequence diagrams to show that aspect.
Geert
Sequence diagrams do not provide free placing of the objects, which is very obstructive. The time aspect is not what I want to show, but I want to show how key operations of objects are wired. The interesting thing is just, a callstack begins with a certain operation and ends with a certain operation.

11
Code: [Select]
+------+                +------+
|      | op1         op3|      |
|  a   #----------------#  b   |
|      |                |      |
+------+                +------+

If # were ports in my sketch, I could label them with op1 and op3 and connect both ports with an accociation. But this looks wrong to me.

12
Uml Process / How to show C++ operation call stacks from object to object?
« on: December 07, 2020, 08:23:58 pm »
Hi,
I tried a communication diagram to show how important C++ call stacks are wired between C++ objects. How can I illustrate the important fact here that method call a.op1() leads to method call b.op3()?

My first attempt was to create an accociation arrow between both objects, a and b, but how to label it in a way that op1() leads to op3()? I want to use the methods and attributes for that which I have parsed from the C++ code.

The scenario is this one:
Code: [Select]
class A {
   void op1() {
       op2();
   }
   void op2() {
      b.op3();
   }
   B b;
}

class B {
   void op3() {
   }
}

A a;

13
Uml Process / Re: show C++ method calls in an object diagram
« on: December 07, 2020, 08:02:45 pm »
No it isn't. I just tested it on a communication diagram using these instructions.

Geert
Yes, you're right. It's with RMB-click and choose "message" there. Thanx

14
Uml Process / Re: show C++ method calls in an object diagram
« on: December 05, 2020, 02:01:03 am »
In a communications or sequence diagram you should be able to select an existing operation.

See here: https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/createacommmessage.html

Geert
It's only possible in sequence diagrams.  :'(

15
Uml Process / Re: show C++ method calls in an object diagram
« on: December 05, 2020, 12:22:53 am »
I guess you are looking for a Communication Diagram

An alternative (used much more) is the Sequence diagram

Geert
Yes, a communication diagram makes sense to show the wired structure of the C++ program. But as I tried I saw there is no possibility either to choose one of the parsed C++ class methods as names for the accociations between class instances in such diagram. How can I use what I have parsed?

Pages: [1] 2 3