In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "EA draw UML sequence diagram in the sample analysis of message signatures", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "EA draw UML sequence diagram in the sample analysis of message signatures" this article.
Example illustration
First, take a look at the timing diagram for creating composite graphics in the graphic editing software below.
The processing flow is as follows:
After selecting the combined target graphics, the user clicks the [Make group] menu (asynchronous call).
Framework sends a menu message to: DrawerView
DrawView gets the selectedShape linked list containing the selected graphics from m_shapeSelector after receiving the message.
DrawView calls the makeGroup method of data:DrawData with the selected selectedShape linked list as a parameter, and the makeGroup method saves the combination result in selectedShape and returns whether the combination was successful. Whether DrawView will be saved successfully in the success variable.
: DrawViewer asynchronous call: Framework's Update interface redraws graphics (omitted below)
Message signature
We take step 4 of the above process as an example to illustrate the setting method of message signature.
Message/Parameters/Return Value
For these three items, we recommend clicking the [Operation] button to select or create operations in the corresponding classes. Manual input has two problems: one is that it is not easy to type correctly, and the other is that it cannot be synchronized with the class. It is not recommended here.
Argument (s)
Fill in the arguments when the operation is called here.
Assign To
Enter the variable used to accept the return value of the operation. If this variable is a data member on the calling side, you can select it directly from the drop-down list.
If the lifeline does not have an associated class
For some reason (such as drawing a sequence diagram first), if the lifeline in the sequence diagram is not associated with the class, do not worry, follow the following steps to specify later:
Select the lifeline in the sequence diagram
Select [Advanced]-[Instance Classfier] from the context menu to start Select
Classfier dialog box
Select the corresponding class
The performance of direct assignment
Scenarios that need to express direct assignment are often encountered in the flowchart, such as the sequence diagram in which the graph is deleted in the lifecycle article.
One way to do this is to enter null_ptr in [Return Value] and / select m_currentShape in [Assign To]. But if you are careful enough, you will notice that there is a colon before null_ptr. It occurs because the format of the message signature in UML follows the following definition (square brackets represent optional):
[attribute] = name [(argument)] [: return-value]
The colon also indicates when the return-value has content. How's it going? can you take it?
Another way is to enter null_ptr in the Message project in the signature dialog box. The following steps can be used to solve the following parentheses:
Double-click the mouse in the blank space of the timing diagram or right-click to bring up the context menu and select the [Property] item.
Select the [Features] property page
Check the [Suppress Brackets for Operations without Parameter] option in the red box in the following figure
In this way, we can get the following result, let's express it a little bit larger.
The real use
In fact, the real purpose of this setting can be used to suppress the parenthesis representation after the message name when the message is to express a certain information rather than an operation.
If you look back at the first step in the sequence diagram at the beginning of this article, the user's choice of [Make Group] is not a function call to Framework, and there will be a lot more without the following parentheses.
For those operations that have no parameters, we can type void in the [Arguments] text box, and the parentheses can be expressed again. The price to this extent should be acceptable.
The above is all the contents of the article "sample Analysis of message signatures in EA drawing UML sequence diagrams". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.